Linux task management tool-Crontab
Crontab is a tool used to execute routine tasks cyclically on the Linux platform. in Linux, cron (crond) is a system service used to control tasks, in Linux, many scheduled tasks need to be started. Therefore, this
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
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
Allow crontab to automatically schedule rows of PHP
To use the crontab auto-dynamic PHP program, you can do this:
Method 11. Add the following in the first line of the PHP program:
#! /Usr/local/PHP/bin/PHP-Q
For example:
Plain textPHP:
#!
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
Article Title: Linux uses the Crontab command to implement timed restart. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and
Linux crontab Command Format and example
Linux crontab Command Format and example
Run */5 * every five minutes ****
0 *** per hour ****
Execute 0 0 every day ***
Execute 0 0 every week ** 0
0 0 1 per month **
Execute 0 0 1 1 * every year *
For
Because Chiang just helped a netizen on his behalf to deal with the requirements of the VPS host scheduled restart function, such as he needs to restart the server every morning 5, we can set the timing reboot execution can be.
First, install
Linux timed execution crontab crontab-eEnter a VI editing interfaceIn the last line add*/30 * * * * netstat >/tmp/net.logIndicates that the netstat command is executed every 30 minutes and the execution results are stored in Net.log.Crontab is a
Crontab start, run, and edit viewThe cron service is a built-in service for Linux, but it does not boot automatically. You can start and stop the service with the following command:/sbin/service Crond Start/sbin/service Crond Stop/sbin/service Crond
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.