Because Linux to run the Coreseek script files regularly and used to crontab, found some use to pay attention to the place:
1. Common commands
Service Cron start cron Service
Service Cron Stop cron Service
Service Cron Reload does not stop the condition of the services downloaded into the crontab configuration file
Service Cron Restart Restart Cron Service
Crontab-e is to edit the crontab configuration file, here is a problem, run this command after the default editor nano, will make people very unaccustomed, run Select-editor, select Vim.basic, run CRONTAB-E command again, The Vim editor is in.
The last line fills in the scheduled execution task to be configured by Crontab, in the form:
minute: Minute, value is 0-59
Hour: Hour with a value of 1-23
Day: Days with a value of 1-31
Month: The value is 1-12
Weekday: Week, value 0-6 (0 for Sunday, 1 for Monday, etc.)
Command: Program path to execute (set to absolute path) for example:/bin/sh/usr/local/coreseek/init/classes.sh
If you want to do it every few seconds, press the online method */30 * * * */bin/sh/usr/local/coreseek/init/classes.sh >/dev/null 2>&1 execution is invalid, only with sleep resolution As follows:
* * * * * * sleep 30; /bin/sh/usr/local/coreseek/init/classes.sh >/dev/null 2>&1.
The./dev/null 2>&1 is to place standard output and error handling in the Recycle Bin.
After editing the configuration file, Wq Save, and then service crontab reload reload the profile, and restart Crontab Services service crontab Restart so that the scheduled task configuration is complete.
Linux crontab timed execution of script notes