Friday, November 14, 2014

Help Center | Space Service | Complaint Center | Space Agreement


(A) cron format: The format is as follows: Minute Hour Day Month Dayofweek command-minute hour day week month day command such as * / 15 * * * * ls represents ls performed once every 15 minutes for each hour that is the first 0,153,045 60 minutes execute ls command 25 8-11 * * * ls ls command to execute the first 25 minutes daily 8-11 points (two) new scheduling tasks are available in two ways: 1, in the command line, enter: crontab -e and add the appropriate tasks, wq save and exit. 2, directly edit the / etc / crontab file, vi / etc / crontab, add the appropriate task. (C) cron service nicaragua not only to read all the files once per minute / var / spool / cron inside, you also need to read a / etc / crontab, so we can use this file to configure the cron service to do something. Use crontab configuration for a user, and edit / etc / crontab is the task for the system. 01 * * * * root run-parts /etc/cron.hourly // execute scripts within /etc/cron.hourly "run-parts" Hourly: If you remove this parameter, then you can write back to run a script name, not the name of the folder. (D) / sbin / service crond start // start the service / sbin / service crond stop // close the service / sbin / service crond restart // restart the service / sbin / service crond reload // reload this service in the system configuration start automatically when the start: at the end of the script /etc/rc.d/rc.local add: / sbin / service crond start (five) after each finished editing nicaragua a user's cron settings, cron automatically in / var generate the next / spool / cron a file with the same name as the user, the user's cron messages are recorded in this file, this file is not directly editable, can only be edited with crontab -e. After starting each had a bell cron once read this document to check whether or not to execute the commands inside. So after modifying this file does not need to restart the cron service. (Vi) rpm -qa | grep cron (seven) * / 2 * * * * root /usr/local/sns/dommt.sh (eight) if crontab does not execute shell scripts: 1. Determine the .sh file executable permission to do? chmod 777 xxx.sh chmod 777 -R xxx 2. ensure sh file commands are used in the absolute path it?
Help Center | Space Service | Complaint Center | Space Agreement
2014 Baidu

No comments:

Post a Comment