开发者

Taskscheduler not working properly on windows server

开发者 https://www.devze.com 2023-01-27 18:41 出处:网络
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.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消