windows scheduler to run a php script

I have to run a php script on a windows server 2003 machine to update a field after every hour. the php script is
UPDATE MyTable SET LockField=0 WHERE LockField<time(CURTIME())-3600;

how would I go about doing it.
Thanks

LVL 9
syedasimmeesaqAsked:
Who is Participating?
 
ftsaoConnect With a Mentor Commented:
Try creating a batch file (use Notepad and save as test.bat) with the following command:

c:\php\php -f c:\path\to\your\phpfile.php

Then add the batch file to the Windows Scheduled Tasks.
0
 
syedasimmeesaqAuthor Commented:
that didn't work..any other ideas there?
0
 
ftsaoCommented:
Sorry, that batch file (and the scheduled task) would have to be created on the server, not on your local machine.
0
 
syedasimmeesaqAuthor Commented:
c:\php\php.exe -f c:\path\to\your\phpfile.php plus little bit more changes that works. Thanks
0
All Courses

From novice to tech pro — start learning today.