Jump to content

I keep getting a wierd cron email message


Recommended Posts

Can someone please explain to me why I'm getting this weird cron email message?  (see attached screenshot)

It says that my cron is not executing when it is supposed to (which is set to 9:am)  this System cron in WHMCS is set to run every 5 minutes, and then there are 2 cron jobs that run the same cron.php in my cPanel (one of them runs every 5 minutes, and one is set to run at hour 9) so I'm not sure what i'm doing wrong...

I need help :) :)

Screenshot_20181204_085357.png

Link to comment
Share on other sites

It looks like your cron job is starting but not fully completing, which would trigger this notification email to be sent. Your cron is most likely failing to complete due to a fatal PHP error.

Do you see any errors if you enable Display Errors on the Setup > General Settings > Other tab and manually execute your cron job from the shell using the all --force -vvv options?

php -q /crons/cron.php all --force -vvv

https://docs.whmcs.com/Cron_Job_Issues#Run_the_cron_job_from_the_server_command_line_with_debugging_enabled

Link to comment
Share on other sites

Thanks for providing the screenshots and additional information.

I'm seeing that you have not set the System Cron to run every 5 minutes as per the documentation here: https://docs.whmcs.com/Crons#System_Cron

The System Cron (cron.php file) needs to be executed by your server's crontab every 5 minutes. What will happen is when the cron file gets executed during your Time of Day hour, it will then perform all automation tasks and mark as completed in WHMCS.

When the cron is able to complete all tasks and mark itself as completed, you will no longer receive that email notification saying that it didn't run during the expected time.

Link to comment
Share on other sites

3 hours ago, Jessie Abernathy said:

there are 2 cron jobs that run the same cron.php in my cPanel (one of them runs every 5 minutes, and one is set to run at hour 9)

Ah, those are not the same cron file being run. One is for importing email, the other is the system cron. 

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