We help IT Professionals succeed at work.

windows scheduler to run a php script

syedasimmeesaq
on
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

Comment
Watch Question

CERTIFIED EXPERT
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.

Author

Commented:
that didn't work..any other ideas there?
CERTIFIED EXPERT

Commented:
Sorry, that batch file (and the scheduled task) would have to be created on the server, not on your local machine.

Author

Commented:
c:\php\php.exe -f c:\path\to\your\phpfile.php plus little bit more changes that works. Thanks

Explore More ContentExplore courses, solutions, and other research materials related to this topic.