There are two types of scheduled tasks: one that is not executed after execution, and one that is executed periodically.
Scheduling tasks are divided into: System scheduling tasks, user-defined scheduling tasks.
The meaning of a scheduled task is to create and manage commands and tasks that are executed automatically over a specified period of time.
1: Short-term execution of Scheduled tasks commands are: At at Command Management ATD process
Usage: at Task_time task_time =now + 4 hours yyyy/mm/hh
ATQ query what tasks ATRM ID Delete Scheduled Tasks
The batch command is exactly the same as the AT command, except that the batch command executes the plan when the system is not busy.
Configuration file:
/etc/at.allow/etc/at.deny these two files control specific users to use at Scheduled tasks, see Help documentation
/etc/spool/at the data for this profile is the location of the task.
2: Cycle Scheduled task Command Crontab management cron process
The crontab command manages two scheduling tasks: System and user.
The system's scheduled tasks are stored under/etc/cron.d/, and if the virus is born into a scheduled task file, it will crash the system.
The format of the crontab scheduled task is detailed in the/etc/crontab file.
System configuration must be in strict accordance with the format, user-defined scheduled tasks do not write user names.
A. Creating a system planning task step:
1:touch/etc/cron.d/myplain
2:vi/etc/cron.d/myplain
0 5-17 */3 * Sun root/root/cron.sh every month three days at 5 o ' ~17 point execution with root script/root/cron.sh
*/5 4 * * * USER/BIN/FSCK daily 4-point execution of command fsck every 5 minutes
B. Create a User plan task:
CRONTAB-E-u root-e option to create a root user task for Edit
Crontab-r-u hu-r delete hu User's task for remove
Crontab-l-U hu-l for list view scheduled tasks
User-Customized scheduled task data is stored under/var/spool/cron/
Cron's configuration file has/etc/crontab/etc/cron.d/*