I have an Agenda job that runs perfectly fine when I define it for the first time. I can see the corresponding document in MongoDB and all is well. But when the server restarts or I press 'Ctrl+C' and terminate the process so after re-running my app, the job does not run afterwards.
There has been a lot of discussion about this issue on git as well.
I have tried:
1- Gracefully handling the SIGTERM
2- Run a MongoDB update query and set the lockedAt, lastModifiedBy, lastRunAt to null whenever you start your app.
Neither of the two worked for me. I can see in MongoDB that the job is not in a locked state so I am confused why does it not run if the app is restarted?