I'd like a script to complete only if it is the first Monday of the month. Can this be done in the crontab file or do I have to do an if/then within the script? If the latter, how?
I must agree with Jean-Pierre.
From my man page:
Note that the specification of days may be made by two fields
(day of the month and day of the week). If both are specified as
a list of elements, both are adhered to. For example, 0 0 1,15 *
1 would run a command on the first and fifteenth of each month,
as well as on every Monday. To specify days by only one field,
the other field should be set to `` * '' (for example, 0 0 * * 1
would run a command only on Mondays).
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.