Cron not working
Project id - 8255344d-43ae-4e2a-ade0-557ac96ab17e
Cron set for 12:00 UTC/05:30 IST (my local time) is not running automatically and I'm required to run it manually for the past 3 days
14 Replies
Project ID:
8255344d-43ae-4e2a-ade0-557ac96ab17e
what kind of app is this?
might been getting your question wrong, but node express server, using the redis, postgres and cron plugin
expriencing the issue post plugins migration
(that's the perfect answer to my question)
but now I'm not sure why you are trying to use railways cron scheduler for an express server?
not sure of the exact reason my team went ahead with it, but most probably was easier to set up
we had a custom cron service running earlier for one function, but adding more functions was causing issues so we bundled them together and used the railway cron
fwiw there's no updates in cron service and it was working well before plugin migration
railways cron will not run the next schedule if your app hasn't existed by the time it's time to run the next schedule
so I'll just say outright, you have the wrong idea, you should not be using railway cron scheduler on a web server
if you have tasks within that service that need to run, you will want to use node-cron in code, or split the tasks off into a worker service that does the set tasks and exits when done
yo, im working with @Vampo on this project, so it is not an express web server, rather 3 scripts which are run one after the other
all 3 scripts run and call
process.exit(0)
(they should hardly take a few seconds)
this was working fine for the past month or so but we started facing the problem a few days backokay thanks for clearing that up!
and the logs do indicate that all three scripts complete and exit? does the status of the last deployment say completed?
guys the cron last ran on 19th and didnn't for the last 2 days
yes on 19th last it worked correctly
you're absolutely positive your code finishes and exists cleanly after it's done?
yes 100%, all three scripts runs and exit as expected without any errors
okay I'll ping the applicable person when I see they're online!
@Greg - cron jobs not running despite the prevoius job completing
It does indeed look to be on our end (timing out waiting to start). I've added it to triage to take a look next week. I suspect that midnight is a popular cron time so it might help to change it to a different time like 1 or 2 AM, for now