Cronjob

Steve Bertrand steve at ibctech.ca
Mon Jun 8 13:08:53 UTC 2009


Jos Chrispijn wrote:
> I would like to execute a script on every last day of the month in my
> crontab.
> Can someone tell me how I should solve that as it doesn't know which
> month day is the last day of the month?
> Solving this in the script to be executed is no option.

I've done this before. My script was in Perl.

Essentially, the script ran once every day. At the top of the script, it
did a DateTime check to see if tomorrow was the 1st of the month.

If it was, the script proceeded, else it exited.

Steve
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3233 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20090608/91c841a6/smime.bin


More information about the freebsd-questions mailing list