Making a certain cron job

Matthew Seaman m.seaman at infracaninophile.co.uk
Mon Sep 8 01:40:25 PDT 2003


On Sun, Sep 07, 2003 at 10:44:18PM -0400, Jason Lieurance wrote:

> Thank you for the response. Does the date part (Date=`date +"%Y-%m-%d"`) go as part
> of the cron job? Thanks again.

% characters are special in crontabs -- you need to escape them using
a backslash:

  0 0 * * *  mail -s log web at ourdomain.com < /var/log/`date +"\%Y-\%m-\%d"`-error_log

	Cheers,

	Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey         Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20030908/230c5986/attachment.bin


More information about the freebsd-questions mailing list