Koozali.org: home of the SME Server
Legacy Forums => Experienced User Forum => Topic started by: NTBlade 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
-
> 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
-
Thanks. That fixed it. :-)
NTB
-
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