Problem with cron running on windows task schedular

Hello,

I have issue with suitecrm installed on Windows 7. SugarCRM complete upgrade from version 6.5.18 to suitecrm 7.1.

I created the batch file as following
cd D:\Program Files\sugarcrm-4.2.0c\apps\sugarcrm\htdocs
“D:\Program Files\sugarcrm-4.2.0c\php\php.exe” -c “D:\Program Files\sugarcrm-4.2.0c\php\php.ini” -f cron.php

It runs manually from batch file but I created the Windows task scheduler to run everyone 1 minutes as stated from Sugarcrm website, it seems to be running batch file but it is not executing the correct as i do not see any log updated in suitecrm scheduler.

Please help.

Hi prowess,

Have you followed the Windows guide?

Thanks,

Will.

Pull up a command prompt on your web server, and type “php -v”. Does it give you some PHP info?

If not, then you need to manually specify the location of your PHP installation in Windows’ PATH environment variable. This guide is pretty clear:

http://www.computerhope.com/issues/ch000549.htm

Hello Will,

Sorry for late respond. I figured out the issue. My cron job does execute but it does not read the correct times. It was off by +7 GMT. I checked the mysql server time stamp and it was for +7 GMT for Pacific time zone. But when the batch file is executed, it somehow add additional +7 GMT so time is not reading right. It is related some how to the php.ini file. So i removed the commend " -c c:\windows\php.ini " from the batch file and it execute and read the correct time stamp. Not really sure why php.ini effect the timing.

My current working executable cron batch file:
cd D:\Program Files\sugarcrm-4.2.0c\apps\sugarcrm\htdocs
“D:\Program Files\sugarcrm-4.2.0c\php\php.exe” -f cron.php

I hope this note can help others if they have issue with their time execution with cron job.

1 Like

Hi David,

In your php.ini, you can set the date time. I would advise setting it to the correct time.

Thanks,

Will.