Why is my cron job not emailing me?


Tutorials - Tutorials

User Rating: / 0

Many of our account holders use cron jobs to perform tasks at specific times. These jobs run at schedulee intervals set within the cron job tool in the cPanel. One of the features of this tool allows you to set an email address so that you receive an email every time the cron job runs. This allows you to keep track of your cron jobs and ensure they are running correctly and as scheduled. However, sometimes we receive support questions that some cron jobs are running but the email is not being recieved. Follow below as we explain how to ensure you get an email for every cron job.

Force an email after cron job is run

  1. Log into your cPanel.
  2. From within the main cpanel area, scroll down and find the Advanced category. Click on the cronjobsicon found in that category.
  3. Now you are in the cron job setup screen. At the top is a Cron Email area where you can enter the email address you want to receive notice every time a cron job runs. Enter your email address here if you do not see an email address next to Current email:

  4. If you already have an email address in that section and are not receiving an email for one of more of your cron jobs, this is because that the job in question is not producing output. We want to force some sort of output, so from the cron job screen, look at the path of the cron job in question so you know where the script lives. Write down the path if necessary.

  5. Now that we know where the script is, go back to the main cPanel page and open up the File Managerfrom within the Files category.
  6. Once in the File Manager, navigate to your cron script. In our sample, it is simply under the public_html folder and is named testcron.php> Locate your file and highlight it, then click on the Edit icon found in the upper toolbar of the screen. Another popup will appear, simply click on the Edit button there as well to continue to the editor.

  7. Now that you are in the editor, we want to add a single line to ensure some output is produced. This can be anything from as simple as a space to a sentence. Below is the code we will add to the end of our script:
    echo "done";
    Be sure the line of code is before the php closing tag of ?>.
  8. Click on the Save Changes button at the top of the screen. Your cron job should now email you every time it runs with the single line of output.

About Us

Royal Developer Top three Web Designing and Web Development Company in Dehradun, Uttarakhand, India. Royal Developer Best SEO Company in Dehradun takes pride in its philosophy of 'Employee First' which empowers to create a real value for the customers. Royal Developer can offer Best and cheap Website Development Software Development & SEO Services. We are the Best service Provider of SEO, SEM, SMO ServicesCompany in Uttarakhand. Web Designing Course in Dehradun, Web Designing Classes in Dehradun, Web Design Training Institute in Dehradun, Web designing institute in dehradun, Best institute for web designing in dehradun, Web development training in dehradun, Web development course in dehradun, Web Designing Training in Dehradun.


- Contact Information - 

Add : RDIT Services Pvt Ltd, 3rd Floor, RGM Plaza, Above Chandu Canteen,
          23 Chakrata Road, Dehradun - 248001, Uttarakhand, India

Email : nikhil@royaldeveloper.inroyaldeveloper.india@gmail.com 


 : +91 8171200108, +91 8979462451,
                                  +91 7895753921

Quick Enquiry Form

Enter your full name

Enter your valid email address

Enter your correct mobile number

Invalid Input

Your Message
Invalid Input

Enter Code
Enter Code
  RefreshInvalid Input


You are here: Home Tutorials Why is my cron job not emailing me?