Just did a backup of the module, then the best chef tips plus an automatic backup functionality, and so on up to the cron service.
Cron is Linux's built-in services, but it does not automatically, you can use the following methods to start up, shut down the service: references:/sbin/servicecrondstart//start service/sbin/servicecrondstop//close service/sbin/servicecrondrestart//restart/sbin/servicecrondreload//reload configuration you can also use this service at system startup time is also automatically started: references: at the end of the script/etc/rc.d/rc.local plus:/sbin/servicecrondstart now this service is already in the cron process inside, we can use this service, cron service provides several interfaces for everyone to use: 1. the direct use of crontab command Edit cron service provides the crontab command to set a cron service, the following are some of the parameters for this command and descriptions: references: crontab-u//set a user's cron service, usually root user to execute this command when you need this parameter crontab-l//lists a user's cron service details crontab-r//deleted without a user's cron service crontab-e//edit a user's cron service such as root view own cron settings: references: crontab-uroot-l then root you want to remove, for example, fred's cron settings: references: crontab-ufred-r in edit cron services edits some formats and conventions, enter: references: crontab-uroot-e enter vi editing mode, the editing of content must comply with the following format: reference: */1 * * ** ls > >/tmp/ls.txt this format of the first part is set to the time of the back part of the command to execute, if a command to execute, you can write these commands into a script, and then here direct calls this script, call time remember that writes out the full path of the command. Time setting we have certain conventions, the preceding five * number represents five digit, numeric ranges and meanings: reference: minute (0-59) small time (0-23) date (1-31) of the month (1-12) week (0-6)//0 = Sunday except digital also has a few special symbol is "*", "/" and "-", "," * represents all of the numbers in the range, "/" representing every means, "*/5" represents the five units, "-" stands for a digit from to a digital, "," separate several discrete digital. The following few examples illustrate the problem: references: daily 6 am 06 ** * echo "Goodmorning." > >/Tmp/test.txt//note simply echo, from the screen do not see any output, because cron email any output to the root of the mailbox. Every two hours 0 */2 *** echo "Haveabreaknow." > >/Tmp/test.txt 11 p.m. to 8 a.m. between every two hours, eight in the morning-023-7/2, 8 * ** echo "Haveagooddream:)" > >/tmp/test.txt each month, and every week from Monday to Wednesday morning 11 point 0114 * 1-3commandline January morning 4 0411 * commandline every time when you have finished editing the settings of a user's cron, cron automatically generate an/var/spool/cron and this user with the same name as the file that a user's cron information are recorded in this file, this file is not directly edited, only you can edit using crontab-e. Cron is started every one clock reading this file at a time, check whether the command to be executed. Therefore this file modifications do not need to restart cron service. 2. edit the file configure cron/etc/crontab cron service per minute should not only read once/var/spool/cron in the file, you need to read a/etc/crontab, so we can configure this file using the cron service to do something. Use crontab configuration is specific to a user, the edit is designed for system/etc/crontab. This file format is: references: SHELL =/bin/bas PATH =/sbin:/bin:/usr/sbin:/usr/bin MAILTO = root//if an error occurs, or a data output, data for mail sent to this account HOME =/# run-parts 01 ** ** rootrun-parts/etc/cron.hourly//every hour to do it again/etc/cron.hourāly script 024 *** rootrun-parts/etc/cron.daily//every day to do it again the script in/etc/cron.daily 224 **0rootrun-parts/etc/cron.weekly//per week to perform again the script 4241/etc/cron.weekly ** rootrun-parts/etc/cron.monthly//each month to perform again the script use/etc/cron.monthly users running path that this parameter "run-parts", if you remove this parameter, you can write back to run a script name, instead of the folder name.
No comments:
Post a Comment