Linux crontab command
1. Introduction crond is a daemon process used in linux to periodically execute a task or wait for processing certain events. It is similar to the scheduled task in windows. After the operating system is installed, by default, the service tool is installed and the crond process is automatically started. The crond Process regularly checks whether there are tasks to be executed every minute. If there are tasks to be executed, the task is automatically executed. In Linux, task scheduling is divided into two types: System Task Scheduling and user task scheduling. There is a crontab file under the/etc directory, which is the configuration file for system task scheduling. Task Scheduling: You can use the crontab tool to customize your scheduled tasks. All user-defined crontab files are saved in the/var/spool/cron directory. The file name is the same as the user name. Ii. Syntax usage: crontab [-u user] file crontab [-u user] [-e |-l |-r] (default operation is replace, per 1003.2) -e (edit user's crontab)-l (list user's crontab)-r (delete user's crontab)-I (prompt before deleting user's crontab) description format of each line of tasks in the/etc/crontab file of-s (selinux context: minute hour day month dayofweek command where minute-the integer hour from 0 to 59-the integer day from 0 to 23-the integer from 1 to 31 (must be the valid date of the specified month) month-an integer from 1 to 12 (or a month abbreviated as Jan or Feb) dayofweek-an integer from 0 to 7, 0 or 7 is used to describe Sunday (or abbreviated as Sun or Mon) command-the command to be executed (available as ls/proc>/tmp/proc or the command to execute a custom script) command can contain root and run-parts, meaning: "root" indicates running run-parts as the root user. It indicates that a folder is followed by all the scripts in the folder.