Jump to content

Cron


pjs32

Recommended Posts

After the cron job runs we usually receive a email with a breakdown on what has happened - ie. 1 failed payment,1 suspension etc.

 

But after upgrading to version 3.6 we are not receiving them -anyone else having the same problem?

 

(We receive emails ok from the system but just not the cron breakdown ones)

Link to comment
Share on other sites

  • WHMCS CEO

Often the cause of not getting the cron email report is it timing out. If you have a lot of accounts due for suspension or termination, or a low PHP max_execution setting it can easily timeout during the processing.

 

Matt

Link to comment
Share on other sites

Hi,

 

If there's someone who is still in problems with getting the cronjob activity report you may want to test these solutions. These steps may sound as basic stuff but they helped me.

 

1. If you want to override the PHP-settings only locally create a .htaccess file where you want to increase the max_execution_time and just to make sure, also the memory_limit value:

 

php_value max_execution_time 400

php_value memory_limit 64M

 

Change the values 400 and 64 to whatever you want.

 

2. I also changed the cron command a bit and I know use php -f /folder/folder/cron.php

Link to comment
Share on other sites

After upgrading to version 3.6 the same problem occurs to me that pjs32

 

Did you try the solution Matt posted?

 

Often the cause of not getting the cron email report is it timing out. If you have a lot of accounts due for suspension or termination, or a low PHP max_execution setting it can easily timeout during the processing.

Link to comment
Share on other sites

I have ran into this same issue and I have all these php and mysql settings set very high. All set at 240 on a high powered vps where there is only our company site on it, so a busy server or used up resources could not be a problem. There is no reason I should need it set all the way up to 400 when before the upgrade this feature was working just fine.

 

Also I noticed that I can not getting the order notification sent either. Something is just not right here with 3.6. I think this needs to be looked into further IMO.

Link to comment
Share on other sites

We are running/testing on 3.5.1 still and noticed that the Cron Job email was received but the test invoices to be sent out were not sent, BUT the BCC emails of what was supposed to be sent out WAS received. Very weird.

 

I logged in a couple of hours later and force sent the Invoice as admin to the test user and it WAS then received, so there are no spam blocks stopping things either.

 

Has anyone else seen similar things?

 

Cheers,

Paul

Link to comment
Share on other sites

One last notice to help to debug the code if there's really something wrong with the script.

 

I noticed that I can only get the report delievered to my email if there has been none or only 1 activity done during the cronjob. For example if there's 2 due payment notices going on one day, I have to run the cronjob twice to get the email. I'm not sure i during the first run only one of the 2 notices are delievered to the customers, I have to look into that.

Link to comment
Share on other sites

  • WHMCS CEO

The only issue will be it timing out as I posted earlier in the topic. The fact that it's intermittent and only happens when there's multiple things to do would also support that. The cron does need some time to run when interfacing with remote servers.

 

Matt

Link to comment
Share on other sites

We are running/testing on 3.5.1 still and noticed that the Cron Job email was received but the test invoices to be sent out were not sent, BUT the BCC emails of what was supposed to be sent out WAS received. Very weird.

 

I logged in a couple of hours later and force sent the Invoice as admin to the test user and it WAS then received, so there are no spam blocks stopping things either.

 

Has anyone else seen similar things?

 

Cheers,

Paul

 

That sounds like an issue with your MTA rather than WHMCS - if the BCC was received then the email left WHMCS properly.

Link to comment
Share on other sites

That sounds like an issue with your MTA rather than WHMCS - if the BCC was received then the email left WHMCS properly.

 

We are going to run some more tests to another couple of test users with differing email addresses and mail server locations.

 

It may have been a weird coincidence. We will know more in a few days time.

 

Cheers,

Paul

Link to comment
Share on other sites

The only issue will be it timing out as I posted earlier in the topic. The fact that it's intermittent and only happens when there's multiple things to do would also support that. The cron does need some time to run when interfacing with remote servers.

 

Matt

 

Matt, could the problem be that the server is trying to connect with remote servers that are not configured right to whmcs? We had to choose just some of the control panels WHMCS supported to the server because the control panel we use is not supported by WHMCS(There was no option that the server doesn't use any control panel). At the moment we have set Directadmin as our control panel at the server section even though we don't use it.

 

I just took off the automatic account suspension and some other features. I was wondering if the cron-script was trying to suspend some hosting account on the server thinking it's using directadmin and therefore it times out? Could this be possible?

 

Because otherwise the max_executing_time should be enough, it's set to 400 seconds.

Link to comment
Share on other sites

I just noticed our cron didn't run today but was fine yesterday.

 

 

The only thing that has been changed is that we have added a centovacast server. Before this, localhost was the only box whmc was looking at.

 

Ill try and up the execution time and see what happens. Although the server is on the same vlan so responses should be fairly quick!

Link to comment
Share on other sites

  • WHMCS CEO

There are no issues running the cron for the vast majority of users and there is no bug as far as I can tell - receiving the report intermittently all points towards timeouts. If you are having problems, you should open a ticket.

 

Matt

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