[Gllug] crontab 'last friday in each month'

Andrew Halliwell ah at gnd.com
Mon Dec 8 13:28:24 UTC 2003


And verily, didst Tethys announce to the hordes:
> 
> 
> Richard Jones writes:
> 
> >This runs the script on the first Monday of the month (assuming I've
> >got this correct ...):
> >
> >0 15 1-7 * 1 script.sh
> >
> >How can I run the script on the last Friday of each month?
> 
> Run it on every Friday, and have the script itself bail if there are
> less than 7 days to the end of the month. Can't think of an easy way
> of doing it directly with cron, though.

How about a script started on the 1st of the month that parses the calendar,
and sets an at job for the last friday of the month?

:)

(can you get more circuitous than that?)

-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list