-
-
Notifications
You must be signed in to change notification settings - Fork 53
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
Run missed task from persistent storage #328
Comments
Sure. The easiest way will be to create your own schedule source that checks in database what tasks have run and execute required tasks accordingly. |
@s3rius I was thinking about this idea. However if i put tasks to database then after restart scheduler couldn't find out when to start missed task because it doesn't have created date. A task has crontab string which means that it has to run every N minutes/hours. And when this task will pass through the function |
You can remember when was the last run of the task and decide whether to run the task based on this value. It might be a bit tricky with cron, but should be possible. |
@s3rius Where should i store this date value? I would like to put in
Maybe I overcomplecated some things or came up with the wrong idea. Would be very grateful to see your comment |
Hello. Is it possible to add functionality so i could run missed tasks if scheduler was restarted?
For example, task runs every 10 hours. After some amount of time when there are 10 minutes left before the task starts, the scheduler is being restarted due to some technical issues. After that the task is missed and scheduler has to start cycle from scratch. What i want to do is to store scheduler tasks in Redis and on restarts check if task is missed.
I went through the source code but I couldn't find a proper way how to solve it. Can you give some recommendations please?
The text was updated successfully, but these errors were encountered: