How to setup a cronjob in cPanel?

How to setup a cronjob in cPanel?

Cron Jobs allows you to automate certain scripts on your website, which will be executed at your chosen period (every day, every week and etc)

In order to create a periodic task (cron job) in cPanel, follow the guideline:

First, you need to connect to your cPanel dashboard, which you can do by following steps:

  1. Log in to your account in our Clients Area:
  2. Choose your Web Hosting(cPanel) service;
  3. Press the button “Access Control Panel” on the left menu and then the button “Click here to access control panel“.

Scroll a little down in the main Dashboard and choose “Cron Job” in the “Advanced” section. You will be presented with a menu to create your cron job:

If you are interested to get notified every time the cron job has been executed, you may enter your email address at the line “Email” and press the button “Update Email“.

After that you will need to set the time period, how often and when will the cron job running. This can be set by choosing one of the suggested periods in the “Common Settings” drop-down menu. If you want to manually set the time period, you can do it by manually entering the values in the following fields: Minute, Hour, Day, Month, and Weekday.

Once you have chosen the time of your cron job, you will need to provide the script path. This means, that the actual script file has been stored on your server (for example “/var/home/username/public_html/path/to/cron/mycronjob.php") and press the button “Add New Cron Job“.

Was this article helpful?

Related Articles