简体   繁体   中英

Automatically run PHP script in task scheduler windows xp

I've been reading around on how to execute a php script automatically, and i came across this guide:

http://mukundtopiwala.blogspot.com/2012/07/run-php-script-automatically-on-windows.html

It explains rather easily how to do it, but the thing is that the server I am using runs on windows xp and the interface is a bit different, it lacks an "Argument" field in which to put the target php script.

Right now i have something like this:

execute field:

C:\wamp\bin\php\php5.4.16\php.exe -f 'C:\wamp\www\ControlAsistencia\php\GenerarParesDeTiempo.php'

Start at field_:

C:\wamp\bin\php\php5.4.16

I tried puting double quotes around the php.-exe part, but everytime I hit "apply" they erase. the task is not executing. Any idea why?

You could try creating a batch file script that runs instead. So, you would create a file called something like "myfile.bat" using Notepad, and you would use this code in that file:

C:\wamp\bin\php\php5.4.16\php.exe -f 'C:\wamp\www\ControlAsistencia\php\GenerarParesDeTiempo.php'

And you would use the Task Scheduler program to run the myfile.bat

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM