How to Set Up Cron Jobs in cPanel (Automate Website Tasks) Print

  • 0

A **Cron Job** is a time-based scheduler that lets you automate commands or scripts to run at a specific time and date on your web server. This is used for critical maintenance tasks like running backups, deleting temporary files, updating a WordPress theme, or clearing a cache.

Note: This article demonstrates setting up a new Cron Job using the interface in cPanel.

⚙️ Cron Job Setup Steps

  1. Log into your cPanel dashboard.
  2. Navigate to the Cron Jobs interface. Scroll down to the Advanced section and click the Cron Jobs icon.
  3. Update Email (Recommended). First, make sure the Email field contains a valid address where you want to receive the output of the Cron Job (any errors or execution messages). Click Update Email.
  4. Add New Cron Job.
    1. Set the Frequency: Use the Common Settings dropdown to quickly select a predefined frequency (e.g., *Once a week*, *Every hour*, *Twice a day*). This will automatically fill the **Minute, Hour, Day, Month,** and **Weekday** fields. Alternatively, you can manually enter values in each field for a custom schedule.
    2. Enter the Command: In the Command field, enter the full path and command of the script you want to run (e.g., /home/username/public_html/cgi-bin/clients.cgi).
    3. Save the Job: Click **Add New Cron Job**.
  5. Verification. Your automated task will now run at the schedule you defined. You can view, edit, or delete existing Cron Jobs at the bottom of the screen under the Current Cron Jobs section.


Was this answer helpful?

« Back