Jump to content

Cron Timezone Issue


joshsnc2000

Recommended Posts

We recently migrated our WHMCS over to a newer server running Plesk 12. Everything went well except some Timezone issues.

 

We have found that when our crons run for billing and for ticket pop importing the cron kicks off at the RIGHT time however the scripts themselves are executed in the timezone set on the system time of the shared VPS server. This causes all of our tickets to be shown as being brought in 4 hours in the future as well as billing cron timestamps being incorrect.

 

Has anyone else seen this issue or know how specifically to get the cron under your subscription in Plesk or on CentOS to use a specific timezone.

 

Note that we did set the timezone under the Plesk general settings and also attempted to do it under the Plesk subscription however neither seem to make a difference however setting it for the domain itself under PHP settings does work for scripts accessed via the domain (http).

Link to comment
Share on other sites

i'm not sure if this will help your exact situation, as i'm not overly familiar with Plesk, but you can specify a timezone in your WHMCS configuration.php file...

 

http://forum.whmcs.com/showthread.php?95954-How-to-change-WHMCS-timezone&p=402179#post402179

 

we did this to our live whmcs installation as the cron was running at midnight, but the whmcs logs were showing 11pm.

Link to comment
Share on other sites

I wanted to provide an update on my findings. Apparently Plesk 12 CentOS (running as a VM) uses the default machine timezone for crons. I attempted to set the time zone for Plesk as well as the subscription and the domain itself and the cron still wants to use the default.

 

To test the theory I changed my email cron to GET https://domain/pipe/pop.php >& /dev/null and it worked correctly.

 

Then after more troubleshooting I used php -c to specify the php.ini specifically and it seems to work. like this:

php -q -c /var/www/vhosts/system/domain/etc/php.ini /var/www/vhosts/domain/folder/pipe/pop.php >& /dev/null

 

I will continue to keep an eye on it but I think that is the root issue that in this configuration cron does not reference the php.ini on the subscription or the domain.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated