I was trying to setup a cron to run a php script on my windows server. The script is working fine when accessed manually but it doesn't work via the task schedule.
Here is the problem:
// Code to fetch stuff from db
mysqlqueries...
for loop{
// Mail according to fetch content
mail function
}
// Mail a status report at the end to me.
I am getting the status report but nothing else, my server is on godaddy and when i chatted with support they said there is "a special syntax for running crons" in php?开发者_如何学运维 This is the first time i have heard about such a thing. Can anyone help?
I was able to fix the issue, nothing needed to be changed in the code. I just had to change from php.exe to php-cgi.exe in the cron call.
精彩评论