PDA

View Full Version : [ubuntu] Runs commands at a scheduled time



SirMeaky
October 20th, 2010, 08:23 AM
Hey, I am running Ubuntu Server 9.04 and I was wondering, how would I setup scripts that run a certain command at a certain time?

Also would I be be able to run multiple commands? For example once one of the commands has finished running could it start another command straight after?

Thanks :)

utnubuuser
October 20th, 2010, 08:45 AM
read up on "Cron"

Ryan Dwyer
October 20th, 2010, 08:45 AM
You need to edit /etc/crontab.

You can do stuff like: command1 && command2 # which will only run command2 if command1 succeeds. If you want to run command2 regardless of whether command1 worked, use a bash script.