Andrew Smith wrote:
hi
i have a script that connects to the internet, sends and receives email, then disconnects. i want it to run 3 times a day - at 8:30, 12:00 and 16:30 on all days except sunday. it looks like CRON is a sort of scheduling program, but from what the man pages say, it only runs when a user is logged on and that user has the event set up in their area. as it will be running on a server, no users will be directly logged on to the machine, so how can i get round this. what is the exact procedure or where can i find a step-by-step guide - is there a howto on the subject?
cron is intended to run continuously and it starts commands as near to the scheduled time as it can. No-one needs to be logged in at all. The easiest way to handle cron IMHO is to use crontab -e to edit your crontab file, man 5 crontab will show you the details. You example requires 2 lines: 30 8,16 * * 1-6 script with arguments 0 12 * * 1-6 script with arguments If you change it to run at 12:30 you only need one. I don't like running things at even times because all too many others do and so using a prime number for the minutes spreads the load. /Michael -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/