New crontab not running

Mark Ovens mark at ukug.uk.freebsd.org
Sat Dec 23 21:56:13 GMT 2006


Matthew Seaman wrote:
> Mark Ovens wrote:
> 
>> I added a new cron several days ago - using ``crontab -e'' - to run
>> portsnap every night at 3am but it has never run and I can't work out why.
>> 
>> /etc{148}# crontab -l
>> # Update ports tree
>> 0 3 * * * root /usr/sbin/portsnap cron
>             ^^^^
> 
> That's the problem.  You don't need the username in that sort of crontab,
> and unless you've got an executable called root, that isn't going to do
> anything.
> 
> It's only the crontab in /etc/crontab that has a username per line.  The 
> crontabs from /var/cron/tabs already belong to particular users, so don't
> need that information inside them as well.
> 

Thanks Matthew. I copy 'n' pasted that from the manpage, but didn't read 
it properly - it said to put it in /etc/crontab

Regards,

Mark




More information about the Ukfreebsd mailing list