a month ago
Hello, i have a service (cron) thath is stuck and is showing thtah runs for 19 hours now, the previous was stuck also wtf is that?
Attachments
2 Replies
a month ago
This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.
Status changed to Open Railway • about 1 month ago
a month ago
Probably your cron isn't exiting after it finishes, Railway keeps it running indefinitely, and skips every new scheduled execution as long as the previous one is still active, because of that both were stuck.
Make sure that your script closes all open connections and exits the process when done.
more here: https://docs.railway.com/cron-jobs#service-execution-requirements
a month ago
This usually means the cron process never exits. Railway shows it as "Running" because the previous cron execution is still alive, so the next scheduled run may also get stuck.
I’d check the service logs to see where the job is hanging, and make sure the script finishes with a clean exit after the task is done.
For example, if this is a Node/Python cron job, ensure there are no open DB connections, pending async tasks, infinite loops, or long-running background processes keeping the container alive.
If the job is supposed to run once and stop, it should complete and exit instead of staying alive for hours.