Common crontab are as follows:
CRONTAB-E Edit Crontab
Crontab-l Display Crontab
Crontab-r Delete crontab
CRONTAB-V Displays the last time the crontab was edited, but not all systems are applicable.
Edit Crontab
Entering "crontab-e" in the instruction mode will open crontab with the preset editor, in the form of one task per line, and the content of each task will be:
Minute hour Sun Moon Week execution Instruction
The following example automatically executes the/root/sync_time.sh every:00, and if you do not want to store the output, put the output to/dev/null.
0 0 * * * /root/sync_time.sh > /dev/null 2>&2
When you have edited the crontab, save it.
Some practical wording is as follows:
@daily/usr/local/www/awstats/cgi-bin/awstats.sh
The above @daily syntax will be performed:00 every day, and the following are other uses:
@reboot: executed at each boot.
@yearly: equivalent 0 0 1 1 * written, that is, January 1:00 each year.
@annually: Same as @yearly.
@monthly: Executed at:00 per month.
@weekly: Performed on Sunday:00. Run once a week, "0 0 * * 0″.
@daily::00 every day.
@midnight: Same as @daily.
@hourly: Execute 0 minutes per hour.
Crontab Detailed Introduction
Utility crontab Command