I generated a cron to run every Monday at 5am.
0 5 1 * 1
The third number, 1, for day of month, has it set to run on the first of every month as well as Monday.
Do I change that 1 to 0 so it ignores the day of month? Otherwise it will run every Monday as well as run on the 1st of the month.
Have two entries:
to run every Monday at 5 AM : 0 5 * * 1
to run on 1st of every month at 5 AM : 0 5 1 * *
OR, if you want a single entry, the you may have to do something like: https://github.com/xr09/cron-last-sunday/blob/master/run-if-today
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With