[ale] cron fun
Robert L. Harris
Robert.L.Harris at rdlg.net
Fri Feb 2 12:03:00 EST 2007
Ok, I've got a cronjob, /etc/cron.d/dumppkgs that reads as such:
----------------------------------------------------------------------
# /etc/cron.d/php4: crontab fragment for php4
# This purges session files older than X, where X is defined in seconds
# as the largest value of session.gc_maxlifetime from all your php.ini
# files, or 24 minutes if not defined. See /usr/lib/php4/maxlifetime
MAILTO=robert at rdlg.net
DATE=`/bin/date +%w`
OUTFILE="/etc/Packages.dump.week."$DATE".txt"
# Backup dpkg selections
0 12 * * * root /usr/bin/dpkg --get-selections > $OUTFILE
----------------------------------------------------------------------
For some reason it's not properly setting $DATE and instead is trying to
make OUTFILE="/etc/Packages.dump.week./bin/date +%w.txt" which obviously
wont' work.
I'm pretty sure I'm not smoking crack, what have I done wrong?
Robert
:wq!
---------------------------------------------------------------------------
Robert L. Harris | GPG Key ID: E344DA3B
@ x-hkp://pgp.mit.edu
DISCLAIMER:
These are MY OPINIONS With Dreams To Be A King,
ALONE. I speak for First One Should Be A Man
no-one else. - Manowar
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
More information about the Ale
mailing list