Jump to content

Cron not working after update


Gustav

Recommended Posts

Hi there,

 

I followed Chris tip and also had a chat with Hostgator. Everything seems to be fine correctly setup but system LOG states that cron job never completes. It starts running but never ends as expected. I do not get any email as I used before the update to V7. Actually everything has been working fine until the upgrade comes out.

 

I use: /opt/php56/bin/php-q /home/username/public_html/path-to-whmcs/crons/cron.php

 

my config.php is pointing to this folder and the configuration one is right set to the whmcs root as expected. My cPanel is set just like that above either.

 

Any idea why I'm still facing such behaviour?

 

Thanks folks,

Link to comment
Share on other sites

Hi Chris,

Thanks for the heads up :-)

 

I got an WHMCS email this time aroud the right time 4AM I had set earlier in Dash but with the following error: /bin/sh: /opt/php56/bin/php-q: No such file or directory

 

Do you know what's going on?

 

thanks

 

 

Hey Epimazzo,

 

Can you try running the following from your shell terminal

 

WHMCS v7.1:

 

 

WHMCS v7

 

- - - Updated - - -

 

Chris,

 

Can't actually run directly in my shell terminal as I do not have access and permissionto do so. We're a Hostgator reseller and run a shared server. We do not have rights to do it or get access on the server shell unfortunately. :-(

Link to comment
Share on other sites

I'm useing hostgator and this works /opt/php56/bin/php -q /home/{user}/crons/cron.php fine, you sure your cron is in the right directory?

I put mine outside the public area, default is not. Check the docs for more info.

UPDATE: I just reread the post, u seem to have it all correct, what your permissions on the cron folder? Also make sure in your cron line you havnt't added any spaces incorrectly, that may give that error.

 

Steve

Edited by stefan1959
Link to comment
Share on other sites

Hi Steve,

I had made a few changes and now the Cron Daemon email I got states the following: /bin/sh: /opt/php56/lib/php: is a directory Do yo know if is it ok from a Cron Daemon perspective? Despite of this, I still get an alert in WHMCS Dash regarding the CRon job not working. Geezzzz......

Link to comment
Share on other sites

It worked for me.

 

But Now I recieve this message:

 

=================

 

Your WHMCS is configured to perform the Daily System Cron during the hour of 1 pm. However, the Daily System Cron did not execute within that hour as expected.

 

This may be due to the scheduled time specified in your web hosting control panel's cron entry. Please ensure your web hosting control panel executes the WHMCS System Cron (cron.php) at least once during the hour of 1 pm.

 

If you have confirmed that setting, and you continue to receive this message, then please refer to the WHMCS Cron documentation to ensure you have itemized the appropriate command and any additional options.

 

Please contact WHMCS Support if you require further assistance.

===============

Link to comment
Share on other sites

  • 2 months later...
Hi all,

 

I had a mistake on my cron line. Following Chris suggestion and Hostgator information, finally I managed to get the cron work with this:

 

/opt/php56/bin/php -q /home/[username]/public_html/[whmcs_folder]/crons/cron.php

 

For those hosting on Hostgator and using WHMCS 7, this is the solution for the cron task issue. You need to append /opt/php56/bin/ to the cron in order to force the it to use the right PHP and ionCube versions.

 

Thank you Chris for your advice.

 

This did it for me. Thank you!

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • 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