Jump to content
Sign in to follow this  
Jessie Abernathy

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

Share this post


Link to post
Share on other sites

Why have you created two cronjobs? It should be one that's set for every 5 minutes (or so), and in the settings in WHMCS you tell it when you want the main one to fire (in your case, 9 AM). It uses just one cron in cPanel for all of it. 

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

No i don't see any errors when i manually execute the cron job from the shell (see attached screenshot)

Here is a screenshot of my automation settings inside WHMCS (see attached screenshot)

Here is a screenshot of my settings in my cPanel (see attached screenshot)

 

Screenshot_20181204_112233.png

Screenshot_20181204_112611.png

Screenshot_20181204_112436.png

Share this post


Link to post
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.

Share this post


Link to post
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. 

Share this post


Link to post
Share on other sites

cPanel. Look for cron jobs, and edit the "cron.php" one to be every 5 minutes also, just like the "pop.php" one.

Share this post


Link to post
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.

Sign in to follow this  

  • 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