Friday 29 July 2022

Will Nest.js dynamic cron jobs be deleted after a restart or shutdown?

So I developed a system with Nest.js which is able to create a dynamic cronjob from a user's input in the frontend application, I store this data in my database and at the same time I create the job in the server with the Dynamic schedule module API. Today I was wondering what would happen to my cronjobs if my server was shutdown or if it restarted itself, since my jobs aren't declarative and they are created at runtime I think that maybe when my server starts I should create the cronjobs again? I'm not sure if this get stored in memory or something since it's not in the documentation.

My concern, in fewer words, is:

Should I recreate my jobs using the information from the database once the server starts itself? Why yes or why not?



from Will Nest.js dynamic cron jobs be deleted after a restart or shutdown?

No comments:

Post a Comment