This has never made sense to me. I do not see why it would be useful, and it is highly illogical that * has to behave differently than 1-31.Note: The day of a command's execution can be specified by two fields —
day of month, and day of week. If both fields are restricted (ie,
aren't *), the command will be run when either field matches the cur‐
rent time. For example,
``30 4 1,15 * 5'' would cause a command to be run at 4:30 am on the 1st
and 15th of each month, plus every Friday.
Luckily you can still check the date inside the job itself. So for the first Monday of every month:
Code:
30 9 1-7 * * test "$(date +%w)" -eq 1 && ...
Statistics: Posted by jojopi — Sat Mar 09, 2024 9:13 pm