I always think that timer is a better way to implement the timer. Later, I found out the disadvantage of timer only when I used Linux commands to create scheduled tasks, in timer, it is very likely that your task will be killed as a dead program ....
The Linux system is controlled by a cron (Crond) system service. The Linux system already has a lot of planned work on it, so this system service is started by default. In addition, because the user can set the scheduled task themselves, the Linux
The AT command is a routine scheduled task that runs only once, and the Linux system is controlled by a cron (Crond) system service. The Linux system already has a lot of planned work on it, so this system service is started by default. In addition,
Basic format:whichMinute: Represents a minute, which can be any integer from 0 to 59.Hour: Represents an 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
The Timed task (cron job) is used to schedule commands that need to be executed periodically. With it, you can configure certain commands or scripts to run periodically over a set period of time. Cron is one of the most useful tools in Linux or
1. RoleUse the crontab command to modify the crontab configuration file, which is then configured by the Cron utility when appropriate
, and this command uses permissions that are all users.
2. Format
The code is as follows
Copy
With the crontab command, we can execute the specified system instructions or shell script scripts at a fixed interval of time. The unit of time interval can be any combination of minutes, hours, days, months, weeks, and more. This command is ideal
Crontab is a program that conveniently executes a task in a scheduled (Cyclic) manner on unix/linux systems.
Crontab-e: edit the scheduled script;
Crontab-l view the timing script;
The cron service is a regular execution service. You can use the
sudo crontab-e5 * * * * 5 minutes per hour*/5 * * * * * every 5 minutes0 2 * * * Daily 2 o'clock in the morning executionCron is a timed execution tool under Linux that can run a job without human intervention. Since Cron is a built-in service for
Cron is a regular execution tool under Linux that can run jobs without human intervention. Because Cron is a built-in service for Linux, it does not automatically get up and you can start and close this service in the following ways:
/sbin/service
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.