Advanced

How to Set Up a Cron Job in cPanel

Schedule automatic tasks like backups, email sends, or maintenance scripts to run on a set schedule.

Cron jobs are scheduled tasks that run automatically at set intervals — great for backups, cache clearing, WordPress cron, and more.

Step 1: Open Cron Jobs

Log in to cPanel → Advanced → Cron Jobs.

Step 2: Set the Schedule

Use the dropdown menus for a common schedule (every minute, hour, day, week, month) or enter custom values:

  • Minute — 0-59
  • Hour — 0-23 (24-hour format)
  • Day — 1-31
  • Month — 1-12
  • Weekday — 0-7 (0 and 7 = Sunday)

Use * for "every."

Step 3: Enter the Command

Enter the full path to the script or command:

/usr/local/bin/php /home/username/public_html/cron.php

For WordPress, the built-in cron command is:

/usr/local/bin/php /home/username/public_html/wp-cron.php

Click Add New Cron Job.

Common Schedule Examples

  • Every day at 2 AM: Minute=0, Hour=2, Day=*, Month=*, Weekday=*
  • Every Monday at 6 AM: Minute=0, Hour=6, Day=*, Month=*, Weekday=1

Tips

  • Use full absolute paths — cron doesn't have the same PATH as your shell
  • Send output to a log file: append >> /home/username/cron.log 2>&1
  • Test your command manually in SSH before scheduling it

Want us to handle it?

330 Hosting can do this for you.

Use the guide above if you want to do it yourself. If you would rather avoid breaking email, DNS, files, SSL, or WordPress, our support team can help.