How to Setup a Cron Job in cPanel?

Cron is a Linux program (or other UNIX type OS), used for scheduling your time-based jobs. You can use the program when you want to automate specific repetitive tasks on your server, ultimately saving you time.

In this tutorial, we will help you with "How you can set up a Cron Job in cPanel?" Just follow the steps below.

  1. Log in to your cPanel Account.
  2. Search for Cron Jobs
  3. Update Cron Email. (You will get notification whenever cron job runs)
    [Note:-Not all scripts that are executed via cron jobs provide outputs or send emails. That depends on the PHP code you are using.]
  4. To set up your cron job in cPanel, scroll down from the email options, and find the Add New Cron Job section:

    Before you start configuring the individual time and date elements, find and click the Common Settings drop-down:

  5. Cron Job Timings

    You will need to follow some steps in regards to the timings of the cron job. You can select your desired cron job interval from the appropriate menus, or you can enter your values:

    • Common settings — here, you can select one of the most commonly used intervals. If you choose one option from the drop-down, the system will configure the settings in the Minute, Hour, Day, Month, and Weekday boxes for you:
    • Minute — indicates the number of minutes between each cron job or the minute of the hour that you have set for the cron job;
    • Hour — indicates the number of hours between jobs, or the hour on the days that you have set for your cron jobs;
    • Day — indicates the number of days between cron jobs, or the day of a month, on which you have cron jobs set;
    • Month — indicates the number of months between jobs or the month of the year when you want to run the cron job;
    • Weekday — sets the weekly schedule when you wish to run the cron job.

    In the Command text box, you can enter your desired command that you want to run via the cron job.

  6. The “Job” Part

    The final field in Add New Cron Job is Command. It’s the field where you enter the path to the file that contains the server command which you want to run at the specified times.

    After entering the path, click the button Add New Cron Job.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to enable or disable any PHP Extension in your cPanel?

How to enable or disable any PHP Extension in your cPanel? If you are working with any project...

How to change PHP version of your cPanel ?

How to Change the PHP version of your cPanel? If you are working with any project which needs a...

How to Add an Email Address?

Hello Everyone. Welcome to our tutorial on How you can add a new Email Address. Just follow the...

What is a Cron Job ?

Cron jobs are typically scheduled to run at specific dates or times. The ‘job’ is a script that...

How to Edit/Delete Cron Jobs in cPanel?

In this tutorial, we will help you with "How you can Edit/Delete Cron Job in cPanel?" Just follow...