How to schedule cron jobs in cPanel. A cron job is a command or script programmed to run automatically at a specific time interval.
This feature is ideal for automating repetitive processes, such as database backups, sending notifications, cleaning temporary files, or updating certain data on your website.
How to Schedule Cron Jobs?
Accessing the Cron Jobs Section in cPanel
- Log in to cPanel
- Navigate to the Advanced section
- Click on Cron Jobs
Setting the Email Address for Notifications
At the top of the page, you have the option to enter an email address where you will receive notifications every time a cron job runs.
This is useful for verifying the correctness of execution.
Configuring a New Cron Job
To add a cron job, follow these steps:
- At Add New Cron Job, select the run frequency from the “Common Settings” list (e.g., once a day, once an hour, weekly, etc.)
- Manual completion of the Minute / Hour / Day / Month / Weekday fields is optional if you select a predefined option
- In the Command field, enter the command or script you want to run
- Click on Add New Cron Job
Example Command for a Cron Job
Assuming you have a PHP script named cron.php in the public_html directory:
/usr/local/bin/php /home/account_name/public_html/cron.phpThis command will run the script using the server’s PHP interpreter.
Common Execution Frequencies
- Every 5 minutes:
*/5 * * * * - Every hour:
0 * * * * - Every day at 02:00:
0 2 * * * - Every Monday at 06:00:
0 6 * * 1
Verifying Cron Job Functionality
After saving, the cron job will appear in the “Current Cron Jobs” list. Check if the script runs correctly:
- Through messages received via email (if notifications are enabled)
- Through results generated by the script (e.g., log files, database updates)
Deleting or Modifying a Cron Job
From the list of existing cron jobs, you have the options:
- Edit: to modify the command or frequency
- Delete: to completely remove the task
Recommendations for Using Cron Jobs
- Avoid running resource-intensive scripts too frequently
- Test scripts manually before scheduling them
- Use absolute commands (with complete paths) to avoid errors
- Periodically check performance and generated results
Scheduling cron tasks in cPanel is an efficient method for automating repetitive processes in website administration.
With this feature, you can keep your website updated, clean, and efficient without constant manual intervention.

Comments (0)