PHP itself does not have the function of timed automatic execution, also does not support multithreading. But combined with Task Scheduler and curl, you can make up for both of these flaws in PHP, and you can run PHP scripts from any path without the Apache server environment. Knowledge Preparation
Study and application of curl:Http://www.cnblogs.com/phphuaibei/archive/2011/09/29/2195838.html
Windows System Task Scheduler, you can add scheduled tasks, set task start time and execution interval, implement automatic execution of the application. For example: To achieve a timed restart, shutdown and other common functions. How to use reference the following steps1. Create a new text file, change the file suffi
Linux Task Scheduler:
One-time task execution (at, batch);
At: A timed task that specifies a time to perform a task that can only be performed once.
At the mode of use;
Interactive: Let the user enter multiple commands to execut
Executed *****:5 Time Point: (A few hours and weeks)Minutes: 0-59Hours: 0-23Day: 1-31Weeks: 0-7Months and weeks not recommended for simultaneous useUser-name: Run the task as a usercommand to be executed: the task to run (command)Instance:Annual: 2 3 4 5 *Monthly: 20 18 6 * *Daily: 20 9 * * *Weekly: 17 16 * * *Per hour: 3 * * * *Per minute: * * * * * *Point-in-t
Compile a crontab scheduler task in the CentOS Environment
During host management, we often do some things every day. To avoid manual operations every time, we can write scheduled tasks to automatically execute the host periodically according to the schedule.
Install and startUnder CentOS:
Yum install vixie-cronYum install crontabsThe former is usually installed on the latter.Start the service.
Service cron
spring-Task Scheduler:There is a task in spring which is a set-time automatic Task Scheduler task that is handy when it is used, but he can do as much as quartz! You can use annotations and configuration in two ways, configured in the following ways:1: Introduce spring to th
Java Code test Class public class Testquartz {public void Test () {System.out.println ("*********************quartz Task Scheduler ******************* **");}} Quartz configuration file Then load this configuration file! Attached: cronexpression configuration instructions (from the network)Cron expression on-line generator: http://www.hahuachou.com/cron/index.htm special characters allowed for field allow
How the WIN7 system disables the Task Scheduler service feature
First, the Task Scheduler service is designed to allow you to configure and schedule automatic tasks on your computer, which is the service of the Task Scheduler!
minute not only to read all the files within/var/spool/cron, but also to read a/etc/crontab, so we configure this file can also use the Cron service to do something. The crontab configuration is for a user, while the edit/etc/crontab is a task for the system. The file format for this file is:Shell=/bin/bashPath=/sbin:/bin:/usr/sbin:/usr/binMailto=root//If an error occurs, or if there is data output, the data is sent to this account as an emailhome=//
Executed *****:5 Time Point: (A few hours and weeks)Minutes: 0-59Hours: 0-23Day: 1-31Weeks: 0-7Months and weeks not recommended for simultaneous useUser-name: Run the task as a usercommand to be executed: the task to run (command)Instance:Annual: 2 3 4 5 *Monthly: 20 18 6 * *Daily: 20 9 * * *Weekly: 17 16 * * *Per hour: 3 * * * *Per minute: * * * * * *Point-in-t
Appcmd Restore backup command to restore the IIS configuration: appcmd Restore Backup BackupName$iispath=$iisfolder+"\"New-alias-name Appcmd-value$env: windir\system32\inetsrv\appcmd.exeappcmd Add backupxcopy/s/y C:\Windows\System32\inetsrv\backup$iispath#Export a task schedule, use the Schtasks/create command to import a task plan$Schedule= new-object-com"Sched
: Self is a service that runs uninterruptedAnacron:cron, can be implemented to enable cron for various reasons in the past time the execution of the task did not perform the normal execution once;cron configuration file:/etc/crontab[Email protected] ~]# Cat/etc/crontabShell=/bin/bash #定义执行脚本的shell为/bin/bashPath=/sbin:/bin:/usr/sbin:/usr/bin #定义脚本执行的环境变量位置Mailto=root #执行结果发送给root用户home=/ #家目录# Run-parts: indicates that all command scripts are executed
command, and not inAt.deny The user in the file can executeIf none of the two files exist, only Root can perform at CommandRecurring Scheduled Tasks CronCommands and PackagesEnsure that the service runs:CentOS 7:systemctl Status CrondCentOS 6:service crond Statussystem Cron tasks: System Maintenance Jobsin the /etc/crontab settings in FileThe usage rules with the configuration information itself:First place * represents per minute, desirable value 0-59 , for example, to take a value 5 represen
Tags: field status str stop kind level handy device pngOne, the Linux system's task planThe crontab command is used to submit and manage the tasks that the user needs to perform periodically, similar to scheduled tasks under Windows, when the operating system is installed, the Service tool is installed by default, and the Crond process is started automatically, and the Crond process periodically checks for
types of work scheduling for Linux At: handles the command to end the transfer only once, and requires the support of the ATD service when executing the AT command. Crontab: The set of work cycles is performed continuously, with a cycle time of minutes, hours, weekly, monthly, and yearly.
at:
First find/etc/at.allow This file, the user written in this file can use at, Users who are not written in this file will not be abl
Pictures YangtabDocuments Public4. List the jobs submittedAfter a job is committed, you can use the "at-l" command to list all the jobs.Example: Use "at-l" to list all jobs.[Email protected] ~]# at-l6 2015-01-25 06:13 a root[Email protected] ~]#Where the 1th column is the job ID, followed by the date/time that the job was run, and a represents the at,root that represents the user executing the at job.You can also use the ATQ command to accomplish the same function, which is a link to the AT com
" trigger"0 15 10 * *?" 2005 "2005-year daily 10:15 Trigger"0 * 14 * *?" triggers every 1 minutes from 2 o'clock in the afternoon to 2:59 daily"0 0/5 14 * *?" triggers every 5 minutes from 2 o'clock in the afternoon to 2:55 daily"0 0/5 14,18 * *?" triggers every 5 minutes from 2 o'clock in the afternoon to 2:55 daily and from 6 o'clock in the afternoon to 6:55"0 0-5 14 * *?" triggers every 1 minutes from 2 o'clock in the afternoon to 2:05 daily"0 10,44 14?" 3 WED "2:10 and 2:44 triggers in Wedne
() {//TODO: Add code here to perform the close operation required to stop the service. PCore.Log.LogTextHelper.WriteLog ("onstop:test Service End ..."); } protected Override voidOnPause () {PCore.Log.LogTextHelper.WriteLog ("onpause:test Service paused ..."); } protected Override voidOnContinue () {PCore.Log.LogTextHelper.WriteLog ("oncontinue:test Service continues ..."); } }}About the Windows service on the loading and unloading ca
10.23 Linux Task Scheduler cronThe crontab command is used to submit and manage the tasks that the user needs to perform periodically, similar to the Scheduled tasks under Windows, when the operating system is installed, the Service tool is installed by default and the Crond process is started automatically. The Crond process periodically checks to see if there i
relevant parameters and commands/P /M /d [{+|-}][{/C for all files to execute the specified command, the command body must be in double quotation marks ("), the default is" cmd/c echo @file ". The "cmd/c del/f @path" is used above to delete the specified file. (Here the @file and @path are variables and will be explained later.) )Here are the parameters that are used in the above:@PATH: Represents the full path of the file. http://blog.csdn.net/babauyang/article/details/25742797Automatically de
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.