cron jobs

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
kiranaryan22
Forum Newbie
Posts: 1
Joined: Thu Dec 18, 2008 3:18 am

cron jobs

Post by kiranaryan22 »

I can open a php file using cron on windows using task scheduler. but cannot run the php file
Mark Baker
Forum Regular
Posts: 710
Joined: Thu Oct 30, 2008 6:24 pm

Re: cron jobs

Post by Mark Baker »

Well, assuming that you have PHP on your windows box, the program to run is
\<path>\<to>\<php>\php.exe <scriptname.php>
And that should work
Double check the start directory: you may want it to be the directory where your script sits, so that any relative includes are picked up, and you may also want to check what php.ini file is being used for CLI php
Post Reply