dbader / schedule

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

Bi-weekly and bi-weekly the other week #556

Open tessem opened 1 year ago

tessem commented 1 year ago

Question: Is there a way to run a job every second or third week on a specific day and time (week 1,3,5,7...) ? And similar, is there a way to slide it 1 week (week 2,4,6,8...) ? E.g. running jobA on Mondays in odd-numbered weeks, and jobB on even-numbered weeks.

I know it can be solved with modifying the job-function itself.

markshep commented 1 year ago

I'd be interested in this too. In the case of every().week or every(N).weeks the at() method should have a days offset too (from 0 to 7*N - 1). The offset needs to be from a defined point in time though - for the case of every week it'd be from (say) Monday, but for multi-week ones I guess it'd need a fixed point in time, e.g. 1st Jan 2018 (as that's a Monday).