dbader / schedule

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

Implement .monthThe(<nDay>) #510

Open XuanShine opened 2 years ago

XuanShine commented 2 years ago

Hi, I’ve implemented .monthThe(nDay). Because the schedule does not remind last execution, if we try: schedule.every(4).weeks.do(job), and the program restart before 1 month, the job can never be start. With .monthThe(5), the job will we running every 5th of month. So even if the program restart, it will be run 1 time per month. Take care, 31th happens not regulary. Also, I’ve create a new property in Job: monthDay so now, we use: schedule.every().monthThe(12).at("12:00:00").do(job) In the future: schedule.every(5).monthsThe(12).at("12:00:00").do(job) Regards