A cron job runs a command automatically on a schedule. You can use cPanel to schedule application maintenance, report generation or another task that your hosting account is permitted to run.

Prepare the command

Follow the application’s instructions and confirm the full paths to its script and interpreter. Jobs run as your cPanel account, with its permissions and a different environment from an interactive session.

For a PHP script, a command might be:

/usr/local/bin/php /home/username/scripts/task.php

Replace the example paths and username with the actual values. Confirm that the command uses the required PHP version; it may differ from the website’s version.

Add the job

  1. Open Advanced > Cron Jobs in cPanel.
  2. Under Cron Email, enter an address for command output and click Update Email if needed.
  3. Under Add New Cron Job, choose Common Settings or complete the five time fields. Check the server’s time zone.
  4. Enter only the command in Command, without repeating the schedule fields.
  5. Click Add New Cron Job.

Verify the schedule

Check Current Cron Jobs for duplicates and review the task’s output after its scheduled run. An email depends on command output; no email does not prove success.

Allow each run to finish before the next begins and follow provider frequency limits. Keep useful error output while troubleshooting.