) Create a scheduled taskTake Win8 as an example Control Panel management Tool Task Scheduler Task Scheduler Library create a basic task name (the name of your own scheduled Task) next (default "every day" do not change, back agai
security options on the Scheduled Tasks General tab and the starting (optional) option in the new operation.
Here it focuses on the second type of success.
Create a task”。 First, open the Windows Server 2008 system's Start menu, and select Programs/attachments/System Tools/Task Scheduler commands in turn.
Cli
I found some methods on the Internet to execute PHP scheduled tasks in WINDOWS. one of them was completely written, but unfortunately I did not pass it. Finally, I had to combine the methods of various schools in order to run successfully here. 1. write a PHP program named test. php. the content is as follows:
The code is as follows:
$ Fp = fopen ("test.txt", "a + ");
Fwrite ($ fp, date ("Y-m-d H: I: s"). "success! \ N ");
Fclose ($ fp );
?>
\ WinRAR.exe" a-r-ibck-p123456-y E: \ wwwroot \ Default \ % date :~ 0, 102.16-webdata.rar E: \ wwwroot \ Default \ webmysql \*.*
Delete copy dataE: \ wwwroot \ Default \ webmysql \ * is the Backup Directory, which must be deleted next time. Otherwise, it is easy to repeat.Copy codeThe Code is as follows: del/s/q E: \ wwwroot \ Default \ webmysql \*
Backup Task downloadNote:Download commands from the website to the specified directoryCopy codeThe Code
On the internet to find some of the methods of Windows to perform PHP's scheduled tasks, there is a very full, unfortunately, I did not pass the case. At last, I had to synthesize the methods of each gate to succeed in my operation.1, write a PHP program, named test.php, the content is as follows:Copy the Code code as follows:$fp = fopen ("Test.txt", "A +");Fwrite ($fp, Date ("Y-m-d h:i:s"). "Success has been successful!" \ n ");Fclose ($FP);?>Program
1. Write a PHP program named test. php. The content is as follows:Copy codeThe Code is as follows:$ Fp = fopen ("test.txt", "a + ");Fwrite ($ fp, date ("Y-m-d H: I: s"). "success! \ N ");Fclose ($ fp );?> The program writes it boldly. It's okay to use include \ require.2. Create a Bat file named test. bat. The content is as follows:Copy codeThe Code is as follows:D: \ php \ php.exe-q D: \ website \ test. php// Change the Directory 3. Create a WINDOWS
The scheduled Task (Schedule Task) is a program similar to cron on the Windows platform, and of course the functionality is much worse.
Manual operation is impractical because you need to run a PHP program every hour.
First in the CMD test, for example: C:/appserv/php5/php.exe "c:/appserv/www/temp2.php"
One thing to note is that if that PHP references another
1. Write a PHP program named test. php. The content is as follows:
Copy codeThe Code is as follows: $ Fp = fopen ("test.txt", "a + ");
Fwrite ($ fp, date ("Y-m-d H: I: s"). "success! \ N ");
Fclose ($ fp );
?>
The program writes it boldly. It's okay to use include \ require.2. Create a Bat file named test. bat. The content is as follows:Copy codeThe Code is as follows: D: \ php \ php.exe-q D: \ website \ test. php// Change the Directory
3. Create a WIN
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.