[lug] Cron to run every 3rd tuesday
Stephen Queen
svq at peakpeak.com
Tue Jun 21 07:17:03 MDT 2005
On Mon, 20 Jun 2005, Shannon Johnston wrote:
> I have a perl script that needs to run every month, on the 3rd tuesday
> of the month. Here's my cron entry:
>
> 0 0 11-18 * 2 /usr/local/bin/script.pl
>
> For some reason, it ran this last saturday. Am I missing something?
>
> Thanks,
> Shannon Johnston
>
I haven't tested it, but you might try something like
0 0 * * 2/3 /usr/local/bin/script.pl
That would be every third tuesday, not the third tuesday of
the month. Then agian, it may mean, every 3 days, starting
on tuesday. A field with the form n0/n1 says the range n0 in
steps of n1.
I would have thought that the way you have your entry, it
would have run on the 11th through the 18th and every
tueday.
Stephen Queen
More information about the LUG
mailing list