[sclug] cron expression

Alex Butcher lug at assursys.co.uk
Tue Jan 23 17:54:21 UTC 2007


On Tue, 23 Jan 2007, Jonathan H N Chin wrote:

> darren wrote:
>> Is it possible to create a single cron expression (for vixie cron) that
>> specifies the penultimate day of the month?
>
> If you have GNU date on your path:
>
> 	MM HH * * * [ `date -d+2day +%d` = 1 ] && MYSCRIPT

Very tidily done, Sir! :-)

> -jonathan

Best Regards,
Alex.
-- 
Alex Butcher, Bristol UK.                           PGP/GnuPG ID:0x5010dbff

"[T]he whole point about the reason why I think it is important we go for
identity cards and an identity database today is that identity fraud and
abuse is a major, major problem. Now the civil liberties aspect of it, look
it is a view, I don't personally think it matters very much."
  - Tony Blair, 6 June 2006 <http://www.number-10.gov.uk/output/Page9566.asp>


More information about the Sclug mailing list