This chapter is the key noun explanation: the CRON system scheduling process. It can be used to operate jobs in a daily non-peak load time period, or run at different times in one week or in a month. AT at command. Use it run some special job on a specific time, or operate at a late non-load peak time period or peak load time period. & Use it runs a process that takes a long time in the background. NOHUP uses it runs a command in the background, even if the user is exited.
CRONTAB's domain 1-2 9 第 2 9th hour 1 ~ 2 3 (0 represented children Night) Less 1 ~ 1 2 of the 4th column 1 ~ 1 2 of the first 0 ~ 6 (0) Sundays) Level 6 The command to run is the format of crontab: points <> <> <> Week <> To run the command in which <> represents space. One entry of the C R o N t a b file is read from the left. The first column is divided, and the last column is the command to run, which is behind the week. In these domains, you can use a horizontal bar to represent a time range, for example, you want Monday to Friday to run a job, then you can use 1 - 5 in the weeks. You can also use a comma in these domains ",",,,,,,,,,,,,,, You can use an asterisk * to represent a continuous time period. If you don't have a particular limit on a domain of a certain time, you should also fill in the field *. Each entry of this file must contain 5 time domains, and each domain is separated by spaces. All annotated banks in this document are represented in the list of leads. When using C R O N t a b runs the S H E L script, the absolute path of the script is given by the user to set the corresponding environment variable. Remember, since the user is submitted to C R O N, it is necessary to provide the entire environment you need to C R O n. Don't assume that C R o N knows the special environment you need, it doesn't know. So you have to ensure that all necessary paths and environment variables are provided in the S H E L L scripts, except for some automatic set global variables. The general form of C R O N t a b command is: crontab [-u user] -e -l -r where: -u username. -e Edit C R O N t a b file. -l lists the contents in the C R O N t a b file. -r Delete C R O N T A B file. The AT command A t command allows the user to submit a job to the C R O N daemon to operate later. The time later here may refer to 1 0 m n, may also be a few days later. If you want to run after a month or longer, it is best to use the C R O N t a b file. Once a job is submitted, the A t command will preserve all current environment variables, including paths, not like C R O N t a b, only the default environment. All outputs of the job will be sent to the user in the form of an email unless you redirect it, most cases are redirected to a file. The basic form of the A t command is: AT [-f script] [-m] [Time] [Date] where -f script is the script or command to be submitted. -l lists all current works waiting for operation. The A t Q command has the same role. -r Clear job. In order to clear a job, provide the corresponding job identification (I D); some U N i X variants are only accepted as the Cancel command. The -m job is sent to the user later. The time format of the Time At command is very flexible; it can be H, h h. h h m m, h h: m m m m m m, where H and m are hours and minutes, respectively. It is also possible to use a. M. Or p. M.. The Date date format can be the number of months or the number of times, and the A t command can also identify words such as T O D A Y Y, T O M O R w. Submit a job with a T command to submit a number of different forms, command line mode, and a t command prompt.