a year ago
Please refer to the following screenshot: https://nextcloud.radian.codes/s/9aYdjXHMy4SP459
It shows a cron job in Railway which is configured to execute daily. It did so, until the most recent run which exited with an error 5 days ago, after which no subsequent invocations have been scheduled.
This appears to be a bug either in the platform or the documentation, since I reviewed https://docs.railway.app/guides/cron-jobs#why-isnt-my-cron-running-as-scheduled and it makes no reference to a feature where a cron job would no longer be scheduled after it first encounters an error. The only reason given why a cron job would not be scheduled is if a previous run fails to exit, which the screenshot shows is not the case here.
Is this a bug in cron scheduling, is the documentation incomplete, or is there something I missed here?
8 Replies
a year ago
For now, I have triggered a manual invocation with "run now" to see if that temporarily resolves the problem, but I would like to know why scheduling did not perform as documented in the first place.
a year ago
I see, is there a reason the option is even available for crons? Can it be removed? (Or documented at least?)
a year ago
You're right, there's no reason it should be shown when you have a cron expression set.
Can you help me to understand what you hoped to achieve my enabling it on a CRON service?
a year ago
I don't recall enabling it at all. This service used to be an "application-style" cron job where the timing logic was implemented in my application code, as was formerly recommended in the Railway docs. I converted it from that to the newer cron style, but the service never took any user requests and has never had any domains associated with it.
Did this option get enabled by default when you added the feature?
a year ago
We would not have enabled this feature for you.
Even with an in-code cron scheduler you would also not want to use app sleeping.
So would I be correct to assume you had accidentally enabled that at some point?
a year ago
It's definitely a possibility that I enabled it mistakenly when turning on the setting for some of my other applications that actually do serve user requests, and hence are appropriate for app sleeping. Without an audit log, I can't say for sure. But yes, it clearly makes no sense for me to turn it on for any kind of cron job.
Status changed to Solved brody • over 1 year ago