...
Code Block |
---|
cron -w 5L 23:00 # run on *last* Friday(5L) of each month at 23pm, # Python: cron = Cron("23:00",last_week_days_of_the_month=[5]) cron -w 0,1L 23:00 # run every Sunday(0) and *last* Monday(1L) of the month at 23pm # Python: cron = Cron("23:00",days_of_week=[0],last_week_days_of_the_month=[1]) cron -w 0L,1L,2L,3L,4L,5L,6L 10:00 # run on the last Monday,Tuesday..Saturday,Sunday of the month at 10 am # Python: cron = Cron("10:00",last_week_days_of_the_month=[0,1,2,3,4,5,6]) cron -d 1,L 23:00 # Run on the first and last of the month at 23pm # Python: cron = Cron("23:00",days_of_week=[1],last_day_of_the_month=True) |
The cron Late attribute can also be combined: Remember we *AND* across -w, -d, -m and *OR* for each element in -w, -d,-m
Code Block |
---|
cron -w 4L -d L 10:00 # run on the last Thursday(4L) of the month *AND* Last of day of the month, this only occurs 3 times in a year in 2019 # Python: cron = Cron("10:00",last_week_days_of_the_month=[4],last_day_of_the_month=True) cron -w 0,1L -m 1 10:00 # run every Sunday(0) and last Monday(1L) of the month, in January at 10am # Python: cron = Cron("10:00",days_of_week=[0],last_week_days_of_the_month=[1],months=[1]) |