>crontab -e
This will display the crontab file which you can edit to set your tasks.
These are the options related to crontab
crontab -e Edit your crontab file, or create one if it doesn’t already exist.
crontab -l Display your crontab file.
crontab -r Remove your crontab file.
crontab -v Display the last time you edited your crontab file. (This option is only available on a few systems.)
The syntax of the command :
Eg. 0 0 * * * halt -> means shutdown the pc at midnight everyday.
There is infact an online tool to define your crontab command if the syntax of command bugs you
--> http://www.corntab.com/pages/crontab-gui
Crontab access are restricted by the files
/usr/lib/cron/cron.allow & /usr/lib/cron/cron.deny
If your username is in the allow file you will be allowed to use crontab. If the file don't exists then you will be allowed if your name is not in the deny file. If the deny file is empty then all users all allowed. If the file doesn't exists then only root can use crontab.
its awsome dude
ReplyDelete