Linux timed tasks are: cron, Anacron, at, and most of the cron tasks are usednoun explanationcron--service name; a daemon that performs a periodic task or waits for some event to be processed under Crond--linux, similar to a scheduled task under Windows; crontab--is a custom scheduled task tablePackage InstallationTo use the Cron service, install the Vixie-
Linux timed tasks are: cron, Anacron, at, and most of the cron tasks are usednoun explanationcron--service name; a daemon that performs a periodic task or waits for some event to be processed under Crond--linux, similar to a scheduled task under Windows; crontab--is a custom scheduled task tablePackage InstallationTo use the Cron service, install the Vixie-
Linux OS Timer task system Cron get startedCron is a timed execution tool under Linux that can run a job without human intervention. Since Cron is a built-in service for Linux, it does not automatically get up, and you can start and shut down this service in the following ways:/sbin/service Crond Start//Startup service/sbin/service Crond stop//Shut down service/sbin/service crond Restart//Restart service/sb
function Introduction
Cron is a timed distributed timed task service that ACE provides to developers, and can perform related tasks on a regular basis as required. For example, back.php periodically queries the database for specific messages to be aggregated to the developer. Cron's grammar rules are consistent with the syntax rules of the crontab under Linxu, but the difference with Crontab's configuration file defines
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 crond Start//boot service
/sbin/service Crond Stop//Off service
/sbin/service crond Restart//Restart service
/sbin/service Crond Reload//Reload Configuration
A cron expression has at least 6 (or possibly 7) time elements that have a space separation.sequentially seconds (0~59)Minutes (0~59)Hours (0~23)Days (months) (0~31, but you need to consider the number of days of your month)Month (0~11)Days (weeks) (1~7 1=sun or Sun,mon,tue,wed,thu,fri,sat)7. Year (1970-2099)Each of these elements can be a value (such as 6), a continuous interval (9-12), a time interval (8-
contents of a task[[email protected] tmp]# at-c 5 here omit N bytes/etc/init.d/mysqld start #倒数第二行, is the command to executeRecurring Task Scheduler: CronBefore you use Cron to make scheduled tasks, make sure that the Crond service is started and that the Crond service is set up to enable active startupEnsure that the Crond Daemon (daemon) is in a running state:CentOS 7:systemctl Status Crond.serviceactive:active (running) ...CentOS 6:Service Crond
/sbin/service Crond Start//Startup service/sbin/service Crond stop//Shut down service/sbin/service crond Restart//Restart service/sbin/service Crond Reload//Reload ConfigurationYou can also start the service automatically when the system starts:At the end of the/etc/rc.d/rc.local script, add:/sbin/service Crond Start
Crontab-u//Set a user's Cron service, which is usually required by the root user when executing this commandCRONTAB-L//list det
uninterruptedAnacron:cron adds that you can implement tasks that have not been performed by Cron for various reasons during the past time, and then perform once again after returning to normalSystem Cron Task/etc/crontab[Email protected] ~]# Ls/etc/crontab/etc/crontab[Email protected] ~]# Cat/etc/crontabShell=/bin/bashPath=/sbin:/bin:/usr/sbin:/usr/binMailto=roothome=/# Run-parts* * * * * root run-parts/et
Recurring Plan (a cron daemon): [email protected]:/etc# Ps-ef |grep cronroot903 1 0 16:25? 00:00:00/usr/sbin/cron-Froot16162 6459 0 22:08 pts/1 00:00:00 grep--color=Auto Croncron is a daemon that can be executed periodically based on the combination of time, date, month, and week. (Can be stopped and restarted) [email protected]:/etc# Service cron Stop[email prot
For PHP itself there is no set of solutions to perform timed tasks, but it is done with the sleep function. Such a party is to do some configuration in advance, such as the implementation process:Ignore_user_abort();//turn off the browser and the PHP script will continue to execute. Set_time_limit(0);//set_time_limit (0) allows the program to be implemented without restrictions $interval=60*30;//running every half hour Do{ //Here is the code you want to execute Sleep($int
Task Schedule:1, at some point in the future to perform a task at a time;At specified time executionBatch idle time executionAt timeAt>commandAt>ctrl+dSpecify time:Absolute time: hh:mm, DD. Mm. YY Mm/dd/yyRelative Time: now+#Units: Minutes,hours, days, weeksBlur Time: Noon, midnight, teatimeExecution result of the command: sent to the user who scheduled the task in the form of a message[Email protected] tmp]# at Now+1minAt> ls/tmpat> # Press CTL + DJob 2 at 2016-12-02 17:17[Email protected] tmp]
PHP use cron to achieve the article synchronization to Sina, NetEase and other micro-bo
1.tw2other
?
A PHP applet that supports Twitter sync to digu/sina/zuosa/follow5/9911/watercress Radio/fresh fruit hookup/Human Network/Renren/NetEase Weibo
?
Author: cluriesAuthor's homepage: http://cuies.com
Tw2other Download Address: http://code.google.com/p/tw2ohter/? or download from the attachment (not guaranteed the latest version)
?
Settings are as follows
CronCron is a tool name that executes the script you specify according to a certain time policy, just as it does with timed tasks under Windows.Its corresponding daemon is Crond, which is started as a service at boot time.Therefore, Cron can be managed using service management commands, such as Service,chkconfig.For specific use, refer to:http://blog.csdn.net/jx_jy/article/details/13289217Configuration fileThe crond process wakes up once every minute,
PHP use cron to achieve the article synchronization to Sina, NetEase and other micro-bo
1.tw2other
?
A PHP applet that supports Twitter sync to digu/sina/zuosa/follow5/9911/watercress Radio/fresh fruit hookup/Human Network/Renren/NetEase Weibo
?
Author: cluriesAuthor's homepage: http://cuies.com
Tw2other Download Address: http://code.google.com/p/tw2ohter/? or download from the attachment (not guaranteed the latest version)
?
Settings are as follows
There is a command in Linux that can perform system tasks on a regular basis. This is the Crond service. The following is an introduction to the use of the crontab command.
Linux task scheduling is mainly divided into the following two categories:
Edit/etc/crontab File Configuration cron
The cron service does not only have to read all the files in the/var/spool/cron
Delay Task at
1.at commandHow to use:
At now+5min| time
> Command
>ctrl + D
Example:
At 14:20
at> date
at>
At Now+5min
at> date
at>
At- L | ATQ # #查看未执行的延时任务
atrm IP | At- D # #终止延时任务
at-M # #延时任务有输出不产生邮件, exit message using Q
At- c IP # #查看延迟任务的内容
at-M # #延时任务无输出产生邮件 Mail # #查看邮件的内容, mail in/var/spool/mail/kiosk
At- f filename # #将文件内容中的命令作为延时任务的动作
2. Blacklist/etc/at.deny # #at命令黑名单配置文
A 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 Unix-like systems. The Cron Service (daemon) runs in the background of the system and continuously checks the/etc/crontab
Large chains have a big problem. Every day, thousands of trades occur in each store. Company executives want to dig into the data. Which products sell well? What's bad? Where do organic products sell well? How about the sale of ice cream?
To capture this data, the organization must load all transactional data into a single data model that is more appropriate for generating the reporting type required by the company. However, this takes time, and as the chain grows, it can take more than a day to
using cron to monitor background process statushttp://blog.csdn.net/dyx810601/article/details/729677581.Use cron to monitor the status of the background process and automatically pull the process out if the process dies or the server restarts.Purpose: The server program under Linux will be dropped for various reasons, it will affect the user's use, here provides a simple process monitoring and restart funct
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.