Running python scripts in cron?
how can i run a cron python script on railway? like just run once every minute. No active container?
I have a script called
simulate.py
which i wanna run on a cron schedule. How do I set this up as my nixpack build fails.14 Replies
Project ID:
f939f8da-1921-4926-b703-976d253eafb2
f939f8da-1921-4926-b703-976d253eafb2
railway's cron schedular does not let you run at a frequency of 1 minute, if you need the script to be ran at one minute intervals you would need to either use an in code schedular (active container as you call it) or use https://railway.app/template/fwH-l3 in
restart
mode.
but before we worry about cron at all, we would need to get your script to at least launch, and for that, please provide your repo and any error messages you are getting.the error is very likely that nixpacks is unable to generate a build plan, since your script isn’t following the usual naming conventions (eg. main.py)
but that can be worked around
What is the lowest frequency?
Figured out I could just use a dockerfile
Dropping it here if anyone references this in future
yeah that looks fine to me
ill check
it appears you can now do 1 minute intervals natively, i distinctly remember them disallowing that, at least the ui tells me that it will run every minute
The UI does let me set every minute though
Doesn't seem like it runs at all
fair enough
Bug report?
I'll go away to the cron template
its just a ui bug, nothing of major concern
the min frequency is indeed 15 minutes for hobby users
Noted