Overview
Cron jobs are scheduled tasks that the server runs automatically based on a defined time or interval.
Cron jobs are often used to:
Run maintenance scripts automatically
Perform backups
Update data and databases
Send automated notifications
Start planning system tasks
When you finish this guide, you will know how to:
Create a Cron Job
Specify starting time and intervals
Configure email notifications
Edit existing Cron jobs
Delete Cron jobs if needed
Important information
⚠️ Be careful when planning Cron jobs.
If a Cron job starts before the previous run is complete, multiple instances of the same job can run simultaneously. This can lead to:
Increased resource use
Reduced performance on the server
Conflicts between processes
We recommend that you put in sufficient time between each interval so that the task can finish.
⚠️ Be especially careful when using the command rm.
If the command is incorrectly configured, important files or directories may be permanently deleted.
Prerequisites
Before you start, make sure you:
Have access to cPanel
Are logged into cPanel
Have knowledge of the command or script to be run
Have the necessary file rights for the script
If the Cron job runs a custom script, the script must have executable rights (Execute Permission).
Step 1: Log in to cPanel
If your hosting service supports direct login to cPanel, you can log in via the client area.
This is how you do it:
Find your hosting service under active products/services
Click on Log in to cPanel
You are now automatically logged into cPanel
Step 2: Open Cron Jobs
Find the Advanced options and Click on Cron jobs
Step 3: Configure email notifications
You can receive email alerts every time a Cron job is run.
To enable notifications:
Find the section Cron Email
Enter the email address you want to receive notifications at
Click on Update Email
When notifications are enabled, the system sends an email each time a Cron job generates output.
💡 Tip: If you manage many Cron jobs, you may want to use a separate email address for notifications.
Step 4: Create a new Cron job
To create a new Cron job:
4. Find the Add New Cron Job section
5. Under Common Settings, select the Interval
You can choose from regular intervals such as:
Once per minute
Once per hour
Twice per day
Once per day
Once a week
When you select an option, the following fields are automatically filled out:
Minute
Time
Day
Month
Weekday
You can also manually set the values if you want a specific time interval.
Step 5: Set the command to be run
6. In the Command: field, enter the command or script to be run.
Example:
/home/username/public_html/script.php
⚠️ Important: Always use the full file path (absolute path) to the script or command.
7. Then click on Add New Cron Job.
When the Cron job is created, a confirmation message appears.
💡 Tip: Make sure the script has the right file rights before it is run via Cron jobs.
Step 6: Watch and edit existing Cron jobs
All created Cron jobs appear in the Current Cron Jobs Table
Here you can:
View existing jobs
Control schedules
Edit configurations
Delete jobs that are no longer necessary
If you want to change an existing Cron job:
Find the job in the Current Cron Jobs table and click on Edit
8. Update the desired settings
9. Click on Edit Line to save the changes
💡Tips: To disable email notifications for a Cron job, you can add the following at the end of Command:
/dev/null 2>&1
With the example command of:
/home/username/public_html/script.php /dev/zull 2>&1
Once this is configured, output from the Cron job in question will not generate email notifications.
Step 8: Delete a Cron job
If you no longer need a Cron job, delete it by finding the job in the Current Cron Jobs table and clicking on Delete.
Confirm the deletion by clicking on Delete again
The Cron job is then immediately removed from the system.
Troubleshooting
The Cron job doesn't run
Make sure that:
The command is correctly written
The file path is indicated with absolute path
The script has drivable rights
The time settings are correctly configured
I don't receive any email notifications
Make sure that:
An email address is posted under Cron Email
The Cron job actually generates output
Emails don't end up in junk mail folder
I receive too many notifications
If a Cron job runs frequently, you can disable notifications by adding:
/dev/null 2>&1
at the end of the command.
Summary
You have now learned how to create, manage, and delete Cron jobs in cPanel.
By using Cron jobs, you can automate recurring tasks on your website or server, reduce manual work and ensure that important processes are run automatically at fixed times.






