Friday , 21 October 2016

It's new!!!

[Solved] Why my cronjob not emailing me after it’s done?

It’s an important thing that every cPanel owner must read before setting up Cronjobs. This is simple to setup a cronjob via cPanel. You can also set an email address there to get alerts every time that the cron runs. We’ve already discussed how setup cronjobs via command line, see the section “crontab command and switches.” Also read the example section “10+ examples of Job Scheduling Using Crontab.”

Simply cronjobs executes/runs whatever we want at regular interval of times. Here we go;

How can I setup cronjob via cPanel?

It’s simple. Please do follow the steps explained below:

1, Log into cPanel.
2, Move to “Cron Jobs under Advanced tab”


3, From there you can create the CRON JOB and also add the email account to get the alerts.


Okay all is set! Then why I’m not receiving emails?

The main reason is “the cron job must generate an output to send it via email.” Please try executing the script manually and observe the output. If it isn’t generating any results, please add the following line just before the script ends.

echo "Cron Executed";

If you’ve shell access you can edit the file using your favourite text editor (VI, VIM, NANO etc). Also you can edit the file from the cPanel file manager.

If that doesn’t work please check the CRON and EMAIL logs on the server. Log files locations are listed below:

Cron log : /var/log/cron
Email log : /var/log/exim_mainlog

That’s it!

About Arunlal Ashok

Linux Server Administrator. I'm dealing with Linux servers since 2012. I started this blog to share and discuss my ideas with the world. Check My Profile!! in uPwork (oDesk) and let me know if you need any assistance. Thanks!!


  1. Explained with simple way!

Leave a Reply

Your email address will not be published. Required fields are marked *