10.23 Linux Task Scheduler cron
The crontab command is used to submit and manage the tasks that the user needs to perform periodically, similar to the Scheduled tasks under Windows, when the operating system is installed, the Service tool is installed by default and the Crond process is started automatically. The Crond process periodically checks to see if there is a task to perform and automatically executes the task if there are tasks to perform.
Grammar
Crontab (option) (parameter)
Options
-E: Edit the user's timer settings;
-L: Lists the user's timer settings;
-R: Delete the user's timer settings;
-u< user name;: Specifies the name of the user to set the timer.
Parameters
Crontab file: Specifies the crontab file that contains the task to be performed.
crontab file meaning: In the user's crontab file, each line represents a task, each field of each row represents a setting, its format is divided into six fields, the first five is the time setting segment, the sixth paragraph is the command segment to execute, the format is as follows:
Minute hour day Month Week command order: time-sharing week
which
Minute: Represents minutes, which can be any integer from 0 to 59.
Hour: Represents the hour, which can be any integer from 0 to 23.
Day: Represents a date, which can be any integer from 1 to 31.
Month: Represents the month, which can be any integer from 1 to 12.
Week: Represents the day of the week, which can be any integer from 0 to 7, where 0 or 7 represents Sunday.
Command: The commands to execute can be either system commands or script files that you write yourself.
10.24 Chkconfig Tools
10.25 SYSTEMD Management Services
Crond service startup will be in the/usr/lib/systemd/system/crond.service file, the shutdown service will not be available.
10.26 Unit Introduction
10.27 Target Introduction
10.23 Linux Task Scheduler cron 10.24 chkconfig Tools 10.25 System