darth
darth
RRailway
Created by darth on 2/1/2024 in #✋|help
Recommended approach for django-crontab on railway
Circling back on this in case it helps others, but ultimately I ended up doing the following: 1. Moved the function into a custom django admin command 2. Create a duplicated version of the django service in Railway 3. Set the "Cron Schedule" inside the service settings with a 'Custom Start Command' that executes the custom django admin command
103 replies
RRailway
Created by darth on 2/1/2024 in #✋|help
Recommended approach for django-crontab on railway
No, likely not a major switch. Why would using the schedule module still require two services?
103 replies
RRailway
Created by darth on 2/1/2024 in #✋|help
Recommended approach for django-crontab on railway
Might be the best route.
103 replies
RRailway
Created by darth on 2/1/2024 in #✋|help
Recommended approach for django-crontab on railway
Ok, worth a shot 😆
103 replies
RRailway
Created by darth on 2/1/2024 in #✋|help
Recommended approach for django-crontab on railway
Is there a 'tmp' local directory or something similar that a log message could be written to?
103 replies
RRailway
Created by darth on 2/1/2024 in #✋|help
Recommended approach for django-crontab on railway
Is there anyway to view process info to confirm that it's an IP block issue first?
103 replies
RRailway
Created by darth on 2/1/2024 in #✋|help
Recommended approach for django-crontab on railway
Gmail. The config works locally though, so the only difference would be in how the app accesses the variables inside Railway. However, the app has no problems accessing the database variables set in Railway 🤷‍♂️
103 replies
RRailway
Created by darth on 2/1/2024 in #✋|help
Recommended approach for django-crontab on railway
Yes, it's using "python manage.py crontab add && cron -f" right now.
103 replies
RRailway
Created by darth on 2/1/2024 in #✋|help
Recommended approach for django-crontab on railway
Ok, good to know. In the start command, does it need to have "... && cron -f" appended at the end?
103 replies
RRailway
Created by darth on 2/1/2024 in #✋|help
Recommended approach for django-crontab on railway
No description
103 replies
RRailway
Created by darth on 2/1/2024 in #✋|help
Recommended approach for django-crontab on railway
Fingers crossed then! I appreciate the assistance as well!
103 replies
RRailway
Created by darth on 2/1/2024 in #✋|help
Recommended approach for django-crontab on railway
Yes, it seems to be.
103 replies
RRailway
Created by darth on 2/1/2024 in #✋|help
Recommended approach for django-crontab on railway
This?
103 replies
RRailway
Created by darth on 2/1/2024 in #✋|help
Recommended approach for django-crontab on railway
No description
103 replies
RRailway
Created by darth on 2/1/2024 in #✋|help
Recommended approach for django-crontab on railway
Also the root of the git repo. Where did you place the nixpacks.toml file when you tested separately with the simple app?
103 replies
RRailway
Created by darth on 2/1/2024 in #✋|help
Recommended approach for django-crontab on railway
It's added to the root of the git repo. Does it need to be in a different directory?
103 replies
RRailway
Created by darth on 2/1/2024 in #✋|help
Recommended approach for django-crontab on railway
I followed the above steps, but am seeing the following error in the Deploy logs for the cron version of the service /usr/bin/crontab: not found.
103 replies
RRailway
Created by darth on 2/1/2024 in #✋|help
Recommended approach for django-crontab on railway
I didn't test deploying the simple app on railway, I'm just sharing what I saw in the local behavior.
103 replies
RRailway
Created by darth on 2/1/2024 in #✋|help
Recommended approach for django-crontab on railway
Any time you change anything related to the cron.py file or the cron schedule (set at the end of "django_project/settings.py"), you'll need to re-add the crontab.
103 replies
RRailway
Created by darth on 2/1/2024 in #✋|help
Recommended approach for django-crontab on railway
The 'print' statement from the cron.py file shows up in /var/mail/{user}
103 replies