Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On Server Restart Jobs Previous Jobs are not being Rescheduled #1539

Open
adnanali-in opened this issue Jun 12, 2023 · 5 comments
Open

On Server Restart Jobs Previous Jobs are not being Rescheduled #1539

adnanali-in opened this issue Jun 12, 2023 · 5 comments

Comments

@adnanali-in
Copy link

Whenever I restart my express server my previous jobs are lost, but when I manually change the time in MongoDB the task is updated properly.

Is there a way where we can use the implementation of Updating jobs in such a way that it looks for previous jobs that were not performed and queue them on Server Restart

@harisvsulaiman
Copy link
Member

@adnanali-in What do you mean by lost? Is the jobs not persisted in the db?

@adnanali-in
Copy link
Author

@harisvsulaiman The jobs are stored in the DB but they are not being rescheduled once I restart the server, my mongoDB has the data.

Lets say I have a jobs for 5 pm today and for some reason I restart the server, the job is still present inside the DB but its not executed at 5 pm.

@harisvsulaiman
Copy link
Member

This current main branch is part of the ongoing effort to merge https://github.com/hokify/agenda into agenda see https://github.com/hokify/agenda.

You can try out https://github.com/hokify/agenda in the mean time a see if it solves your problem

@simllll

@adnanali-in
Copy link
Author

So this is a Typescript Version for the Agenda Package right?

@vmpino
Copy link

vmpino commented Jun 19, 2023

This was also discussed here. Depending on how you are using agenda, you may be able to use the method described by farhan711 as a workaround.

edit: links

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants