Activities

November 2009
M T W T F S S
« Oct   Dec »
 1
2345678
9101112131415
16171819202122
23242526272829
30  

Task scheduler for calling php file on Windows

Hi,

I have spent few hours with troubleshooting the issue of setting up a cron job on Windows. This scheduler will call a php page every 15 minutes. When it called over the web it’s send me a mail but on CLI it won’t.

The issue is that program using a SMTP class to send out the mail which wasn’t execute from terminal as php can’t find it path. So each php call originated from the shell console facing file path issues.

I have created a batch file for calling this php script and configure it on Windows task manager. I uses advanced option in Task manager as it is required to execute every 15 minutes of interval.

>php.exe -f pathtoyourscript.php

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>