Divided into two types: one-time scheduled tasks, periodic scheduled tasks.
a one-time scheduled task , also known as the at Timed task, the command for ATD, here D is the deamon of the first letter, the Guardian meaning, refers to the Guardian process; in fact, many programs end in D, such as httpd, memcached and so on.
The ATD service is installed by default on Linux, and can be Chkconfig--list | grep at To view (it is said that CentOS 7 has changed, need to use Systemctl to view, find it yourself), or use service ATD status to view it.
Periodic Scheduled Tasks , crontab (using quartz shoes should look familiar, in fact, from here).
Linux crontab timed tasks are in fact divided into two categories: crontab-e self-editing (only current user, root except), the system's crontab scheduled tasks (including Annacron).
CRONTAB-E will enter a VI interface, where you can set the way and task of execution, in the following format:
* * * * * task
5 asterisks, which in turn represent minutes, hours, days, months, and weeks.
Each asterisk can be used to stitch multiple numbers with commas, or to use dashes to represent ranges, and to use slashes and number n to represent every nth period of time.
Such as:
1,5,7 * * * * task refers to 1, 5, 7 minutes of each hour will perform a task
3-10 * * * task refers to 3-10 minutes per hour to perform a task every minute
*/10 * * * * task means a task is performed every 10 minutes
It is important to note that the minimum time unit is minutes, the maximum time unit is month, and therefore the concept of seconds and years is not supported.
Also, if you specify both days and weeks, that is the set, not the intersection! This means that every day is triggered, not at the same time.
CRONTAB-L Lists all crontab scheduled tasks for the current user.
Crontab-r removes all crontab scheduled tasks from the current user.
Not to be continued
Timed Tasks for Linux