I want to execute a command as root on an Ubuntu 11.04 machine every 24 hours. This machine is not on all of the time, but when it is, it can be left on for days at a time. How should I correctly configure my crontab to execute this command at the desired interval, and is there anything special about executing a cron job as root that I should know about? I am the only person who uses this machine.
You can simply add your script to be executed to directory
To edit root's crontab, run:
Fill in a line with e.g.:
This will execute the specified command
Some small pointers:
Cron will execute the command every 24 hours, as long as the machine is running at the time. If you want to make the machine "catch up" if it was turned off at a planned execution, you should look at