Scheduled Tasks service program
-
Disposable scheduled tasks
such as: # AT 22:35
AT> RM -rf xiaoxiao
AT>
the Job 3 AT Sun Feb 23 22:35:00 2020
by You have have mail in / var / mail / root
AT the -l: View Task
atrm task No. : delete
this defines performed at 22:35 rm -rf xiaoxiao this command, xiaoxiao is a document I wrote, when executed, this file has been deleted.
! ! ! To avoid more junk files, we'd better be redirected to &> dev / null /
Sometimes we need to be a long-term orders, long time, it may be busy, or can not so cumbersome to work, like backup or packaged several times a month, several times, determined to make us feel is weak! This requires long-term planning tasks. - Long-term planning task
if we want Linux system periodically, regularly perform certain specific tasks, then the Linux system is enabled by default crond service is simply easy to do. Create, edit commands scheduled task is "crontab -e", to view the current scheduled tasks command "crontab -l", delete a scheduled task command "crontab -r". In addition, if you are the system administrator login, you can also edit other people's scheduled tasks plus crontab -u parameter in the command.
Use parameter format setup tasks crond
Use crond task of setting parameters Field Description
Field Description
minutes ranges from 0 to an integer of 59
hour values from 0 to 23, any integer
date value is an arbitrary integer of 1 to 31
month value is an arbitrary integer of 1 to 12
weeks of any value of 0 to 7 integer, where 0 and 7 are Sunday
command to execute scripts or programs