Koozali.org: home of the SME Server

Cron job not running

NTBlade

Cron job not running
« on: September 12, 2003, 03:11:44 PM »
Hi,
I'm trying to get my home server to dowload Anti Virus updates during the night using an ftp script to be applied by my windoze boxes weekly.  Here is the script:

#!/bin/sh
ftp -i<<**
open ftpstie.com
bin
get update.files
bye

I made the script executable by chmoding it to 700 and I created a .netrc in the root directory which looks like:

machine ftpsite.com
login anonymous
password 123@abc.com

The script runs fine manually.  I did:
crontab -e to make my crontab file look like:

40 * * * * root /root/getavupdate

But the script doesn't seem to run, or at least the files aren't copied.  /var/log/cron has this line:

Sep 12 11:40:00 test CROND[2022]: (root) CMD (root /root/getavupdate)

I thought that maybe I was too strict with pemissions so I made the file 755 but it still doesn't run.  Can anyone help or suggest where to look?

Many thanks
NTB

michiel

Re: Cron job not running
« Reply #1 on: September 12, 2003, 03:32:59 PM »
> 40 * * * * root /root/getavupdate
This is the syntax for cron files in /etc/cron.d. If you use crontab -e, you don't need the first "root": 40 * * * * /root/getavupdate

Michiel

NTBlade

Re: Cron job not running
« Reply #2 on: September 12, 2003, 03:55:09 PM »
Thanks.  That fixed it. :-)
NTB

Greg Allt

Re: Cron job not running
« Reply #3 on: September 23, 2003, 04:54:08 PM »
Found this great Cron tuturial for those who are interested

Cron Tutorial. Cron, the linux event scheduler

http://www.elitelinux.com/viewtopic.php?p=6199