Key takeaways
- Cron timing uses five fields: minute, hour, day, month, weekday.
- Always use full paths to PHP and your script.
- Replace WP-Cron with a real cron job for reliable scheduled tasks.
A cron job runs a command on a schedule — sending newsletters, clearing caches or running WordPress’s scheduled tasks.
Add a cron job
- Open Advanced → Cron Jobs.
- Optionally set a Cron Email to receive output (useful while testing, noisy afterwards).
- Pick a Common Setting or fill in the five timing fields.
- Enter the Command and click Add New Cron Job.
Timing syntax
The five fields are minute, hour, day of month, month and day of week:
*/15 * * * * every 15 minutes
0 3 * * * every day at 03:00 (server time)
0 9 * * 1 every Monday at 09:00
Writing the command
Use full paths — cron doesn’t run in your project folder:
/usr/local/bin/php /home/acme/public_html/scripts/report.php
Add >/dev/null 2>&1 at the end to stop emails once it works.
Replace WP-Cron with a real cron job
WordPress runs scheduled tasks on page visits, which is unreliable on quiet sites and wasteful on busy ones.
- Add to
wp-config.php:
define('DISABLE_WP_CRON', true);
- Add a cron job every 5–15 minutes:
/usr/local/bin/php /home/acme/public_html/wp-cron.php >/dev/null 2>&1
Keep the frequency reasonable — very frequent jobs count against your account’s resource limits.