To start the crontab service in Linux:
/etc/init.d/crond start
Crontab's command format
CRONTAB-L Displays the current crontab file (the crontab file that is written by default is saved in (/var/spool/cron/user name, for example:/var/spool/cron/roger)
Crontab-r Delete the current crontab (use this method sparingly, as all scheduled tasks will be removed)
CRONTAB-E editing the current crontab file using the editor
Crontab file Format:
Minutes hour day-of-month month-of-year Day-of-week commands
For example:
0 4 * * 2,5/USR/BIN/WALL</ETC/MOTD
Explanation: Information ************************************************ in the broadcast/etc/motd of the week of Tuesday and Friday
*/2 12-14 * 3-6,9-12 1-5 bash_scripts
Explanation: Every two minutes of 3-June, and 9-December Monday to Friday in the afternoon 12-14, a script is executed * * * *
Crontab's configuration file is placed in/etc/crontab
Using Crontab to create timed tasks under Linux