complex crontab query

Charles Howse chowse at charter.net
Tue Sep 30 10:07:00 PDT 2003


> This question was asked and was answered by Crist J. Clark 
> some years gone.
> Google could not help me so I beg to ask here:
> 
> I would like to run a script via crontab every
> 
> 1. 3rd day and 28th day of each month (seems easy)
> 2. Every first Thursday of the month

One solution would be to program the logic into your script, then run
the script every day from crontab.
Example bash pseudo-code:
If day-of-month = 3 or 28 ; then
	do some stuff
Elif day-of-month <= 7 and day-of-week = Thursday ; then
	do the same stuff
fi




More information about the freebsd-questions mailing list