How to create and manage a cron job in cPanel?

This article will go through how to set up and configure a cron job via cPanel, and then proceed with instructions about how to edit and delete a cron job in cPanel, and finally how to update a cron job's email address in cPanel.

 

What is a cron job?

A cron is a scheduler tool, and a cron job is a task that runs on its own based on the time or interval that you choose.

 

The first step before proceeding below, is to make sure you log in to your cPanel account.

The second step, once in cPanel, is to find the "Advanced" section and click on the "Cron Jobs" icon.

 

Then, continue with the instructions.

 

How to set up a cron job via cPanel

1. Under "Add New Cron Job", click on the "Common Settings" dropdown menu and select an appropriate option such as "Once Per Day" or another suitable option. Make sure to edit the fields according to your cron job's settings as each one has its own specific timing.

2. In the Command field, enter your cron job's PHP file location or the command that you want to run.

3. Click on the "Add New Cron Job" button. That's it. From now on, that cron job will run at the specific time that you selected.

 

How to edit a cron job in cPanel

1. Scroll down to the end of the page and under "Current Cron Jobs", locate your cron job and then click on the "Edit" button.

2. Make the appropriate changes and then click on the "Edit Line" button.


 

How to delete a cron job in cPanel

1. Under "Current Cron Jobs", locate your cron job and then click on the "Delete" button.

2. Under the "Delete this cron job?" text, click the "Delete" button.


 

How to update a cron job's email address in cPanel

If you want to receive a cron job error or other notifications to your email address of choice, you can add or update your e-mail address from the cPanel's Cron Jobs Page.

1. Under "Cron Email", you should enter your full email address in the Email text field. If you don't see that field, click on the "more »" link below "Cron Email"

2. Click on the "Update Email" button. You'll now receive email notifications.


3. If you have multiple cron jobs and there's a specific one for which you do not want to receive email notifications, then edit that cron job and in the Command field, at the end of the command, add a space and then this: >/dev/null 2>&1

  • 6 Users Found This Useful
這篇文章有幫助嗎?

相關文章

How to update your cPanel Contact Information or receive a notification on reaching quota limit?

If you want to receive notification on reaching your disk quota, bandwidth usage limit, reaching...

How to Change cPanel Style/Theme?

Unfortunately, as of early 2023, cPanel removed the ability to switch themes for now and removed...

How to Edit file in the cPanel File Manager?

1. Log in to your cPanel account.2. In the "Files" section, click on "File Manager" Icon. 3....

How to Change Language of your cPanel?

cPanel supports a lot of languages, and if you want to change your cPanel language to your native...

How to Reset my cPanel Account Password?

If you can access your cPanel account, follow these steps to reset your password:1. Log in to...