Setting Up cPanel Cron Jobs (Automate Recurring Tasks) Print

  • cpanel cron job setup
  • 0

Cron jobs let your server run scripts automatically on a schedule — perfect for automated backups, WordPress maintenance tasks, or custom scripts.

Setting up a cron job

In cPanel, go to Advanced → Cron Jobs.

Under Common Settings, choose a preset schedule (Once Per Hour, Once Per Day, etc.) or set a custom schedule using the Minute/Hour/Day/Month/Weekday fields.

In the Command field, enter the command to run, e.g.:

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

Click Add New Cron Job.

Common cron schedule examples

Schedule Cron Expression
Every hour 0 * * * *
Every day at 2 AM 0 2 * * *
Every Sunday at midnight 0 0 * * 0
Every 15 minutes */15 * * * *

Troubleshooting cron jobs

  • cPanel emails the account owner the output of every cron job by default — check this email for errors, or redirect output to /dev/null once you’ve confirmed it works to reduce inbox clutter: append > /dev/null 2>&1 to your command.
  • Use full absolute paths (not relative paths) in every command — cron doesn’t run with the same environment as your normal shell.
  • If a WordPress-related cron seems unreliable, consider disabling WP-Cron’s default page-load trigger and relying solely on the server-level cron instead for more predictable timing.

Was this answer helpful?

« Back