How to Enable or Setup Cron Jobs in cPanel Step By Step

(Last Updated On: August 22, 2020)

In this tutorial, you will learn how to set up or enable Cron jobs in cPanel step by step.

When you try to run any script or anything which you dont want to run manually then you can set up cron jobs. But if you dont know how to enable or set up cron jobs then you should learn it first, Cron jobs allow you to automate certain commands or scripts on your site. You can set a command or script to run at a specific time every day, week, etc. For example, you could set a cron job to delete temporary files every week to free up disk space.

How to Setup and Manage Cron Jobs in cPanel

1) Log into cPanel then click the Cron Jobs icon

2) Cron Email – You can have cron(s) send an email every time it runs a command which produces output.

Send an email with the output every time the cron job runs. less »

You can have cron send an email every time it runs a command which produces output. If you do not want an email to be sent for an individual cron job, you can redirect the command’s output to /dev/null. For example: mycommand >/dev/null 2>&1

Note: If you do not wish to receive an email notification of a specific cron job, add the following
line to the command: >/dev/null 2>&1

3) Add New Cron Job – Now you have to define exactly when and how often you want the cron job to run.

4) Next, enter the command of the script you want to run, including the path.

Command Examples:

/usr/bin/php /home/username/public_html/cron.php

mysqldump -u root -pPASSWORD database > /root/db.sql

/usr/bin/wget --spider "http://www.domain.com/cron.php"

5) When you’re done, click Add New Cron Job button.

One Comment

  1. Aadarsh Roy Reply

    Hey hostkarle admin ,

    Excellent post with Fab-work. I truly appreciate your hard work.

    Glad to say that you have suggested helpful tips to setup and manage cron jobs in Cpanel. Every time you comes up with fascinating ideas that are truly engaging in every aspect.

    Your each of the suggested steps (including images) to setup & manage cron jobs in Cpanel are so clear and providing better understanding as well. Following the steps will helps a lot.

    After going through this complete guide i really got helpful ideas and have also boosted my knowledge upto some limit.

    Eventually thanks for sharing your ideas, knowledge and such a helpful post.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

This website is using cookies to improve the user-friendliness. You agree by using the website further.

Privacy policy