Ben Kevan pecked at the keyboard and wrote:
Howdy list..
So I've been trying to work on getting cron to work with every second saturday (or any second day of the week for that matter), and I just cannot get it.. Here are some things i've tried:
The next is running every 5 minutes and checks for Tue (since today is Tuesday and I am testing). This should work as it is the 12th day of the month.
*/5 * 8-14 8 * test `date +%a` = "Tue" && echo `date` >> ~/date
That didn't work for me.. so I said .. forget it and tried:
*/5 * * 8 2 if [ `date +%d` -ge 8 -a `date +%d` -le 14 ]; then echo `date` >> ~/date; fi
still nothing. the commands work just fine which points me back to the cron schedule. BTW .. this is running under the root cron.
Unless you run these from a script and provide an environment you will need to supply the full path for the commands, I.E. /bin/date in order for it to work. -- Ken Schneider SuSe since Version 5.2, June 1998 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org