My node environment is experiencing intermittent execution of cron jobs. Mine is scheduled to execute every 5 minutes and it appears to have stopped today at 2022-07-19T06:45:18.542+00:00. I am not sure what is causing the cron job to not execute.
I previously haven’t had this issue but for the past two days, it seems like it is only executing at random. For reference, I am using node-cron to run the jobs.
The project is https://wrapped-metrics-api.onrender.com, and the cron jobs themselves are within the tvl.js, transactions.js, reserves.js, and prices.js files and are using node-cron.
My app is showing successful deployments but I’m no longer getting a log stating “Starting service with ‘node app.js’” so none of the jobs are executing.
It appears that this same problem is still occurring.
I’m essentially having to re-deploy the application because while the node service is starting, for some reason it is not executing the node-cron scheduled jobs.
I took a look at wrapped-metrics-api and the first thing I note is that it’s running on our free plan, that means the service is stopped after 15 minutes of inactivity, ie requests to the site. That means that any scheduled crons that you are scheduling yourself in this service would not execute as the service has been stopped,