How does one specify 'second Tuesday' in a crontab?

ody davidsen at sungod.crd.ge.com
Tue Aug 22 03:49:42 AEST 1989


The implementation of cron is really stupid! They could have allowed
both day of week and day of month with two lines and then anded the day
of week/month fields to do what you want.

However, you can get what you want at low cost by running a script every
Tuesday and checking the date, as:
	set `date`
	if test $3 -lt 8 -o $3 -gt 14; then exit 0; fi
	# Now do what you really wanted

Thanks for pointing this out, I always assumed that the crontab worked
in the logical way.
	bill davidsen		(davidsen at crdos1.crd.GE.COM)
  {uunet | philabs}!crdgw1!crdos1!davidsen
"Stupidity, like virtue, is its own reward" -me



More information about the Comp.unix.questions mailing list