[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: crontab



On Wed, Nov 05, 2003 at 12:06:14AM -0500, jonchatfield@myacc.net said
> I am trying to add apt-get update, and apt-get -qqy dist-update to my crontab
> to run daily att 6 am and have it send its output to a text file.
> 
> my crontab entries look like:
> 
> 0 6 * * * root apt-get update
> 1 6 * * * root apt-get -y dist-upgrade | less >> ~/distuplog.txt
> 
> It doesnt seem to work.

As Anthony said, try specifying the full path.  Also, remove the "|
less", what is it there for at all?

This is a *very* bad idea, however.  dist-upgrading could involve asking
lots of questions, and you may get unexpected behaviour if you don't
answer them.  A *much* better idea is to run "apt-get -d dist-upggrade"
in your crontab, which will download but *not* install the packages.
They'll be in apt's cache, however, so a "apt-get dist-upgrade" from
your shell will install them all right away, with you there to keep an
eye on it.

-- 
Rob Weir <rweir@ertius.org> | mlspam@ertius.org  |  Do I look like I want a CC?
Words of the day:         wire transfer Janet Reno UK New World Order AGT. AMME

Attachment: signature.asc
Description: Digital signature


Reply to: