To use the crontab timer tool, you must start the cron service:
Service cron start
Crontab syntax for future emergency. First, let's look at the awesome figure:
Crontab parameters:
-E: Execute the text editor to edit crontab. The defined text editor is VI.
-R: Delete the current crontab.
-L: list the current crontab (dedicated for viewing)
-I: It will be used with-r. When you delete the current crontab, ask, and enter y to delete it.
Note that crontab is user-specific, and the crontab will be edited after logon.
Crontab special symbols:
"*" Indicates all numbers in the value range. Pay special attention to it!
"/" Indicates the meaning of each, for example, "*/5" indicates every 5 units.
"-" Indicates a number to a number.
"," Scattered numbers
Crontab file usage example:
30 21 *** indicates every night
45 4, 22 ** indicates the of every month on the 1st, 10th, and 22nd.
10 1 ** 6, 0 indicates every Saturday and Sunday
0, 30 18-23 *** indicates every 30 minutes between and every day
0 23 ** 6 indicates every Saturday
**/1 *** every hour
* 23-7/1 ** every hour between PM and PM
* 8, 13 ** 1-5 Eight o'clock A.M. and one o'clock P.M. from Monday to Friday
0 11 4 * mon-wed: Every Monday to Wednesday
0 4 1 jan * of January 1, January 1
Use crontab in Linux to create scheduled tasks
Routine scheduling of crontab in Linux
Linux crontab does not run troubleshooting
Ubuntu uses crontab for scheduled tasks
Linux scheduled task (at batch crontab anacron)
For more details of this article, please continue to read the highlights of page 2nd: