dbader / schedule

Python job scheduling for humans.
https://schedule.readthedocs.io/
MIT License
11.73k stars 959 forks source link

supports "months" and "years” interval #487

Open coolsnake opened 2 years ago

coolsnake commented 2 years ago

In some case, we have an scheduler in which a task may be executed every two months or two years. The current implementation does not support this kind of setting. It should be much better to support "weeks" or "years" option.

rmzr7 commented 2 years ago

+1

dreamonhigh commented 2 years ago

+1

gabrielcipriano commented 2 years ago

'Schedule' don't have Job persistence (it can't remember schedules between restarts), that means that if you have a task to be executed every year, if your program restart anytime in a hole year, your countdown restarts.

It makes too risky use 'schedule' for this purpose, because we know that programs/computers can (and will) restart when you don't expect

DragosDumitrache commented 2 years ago

@gabrielcipriano that's one way to look at it, but if I persist the jobs description in a DB, and on service restart schedule all jobs, I'd still like that option, and it would be beneficial

ttamg commented 2 years ago

I am wondering if this could be done as a particular on first day of the month or similar. to avoid the problem laid out by @gabrielcipriano above.

gabrielcipriano commented 2 years ago

I am wondering if this could be done as a particular on first day of the month or similar. to avoid the problem laid out by @gabrielcipriano above.

That's a cool feature, I believe that it could be implemented

dondeli commented 1 year ago

Hi @gabrielcipriano Do you have any news about the feature that @ttamg has mentioned?