How do I set up a cron job? Print

  • 0

A cron job runs a command or script automatically at fixed times, for example every 5 minutes or every night.

  1. Log in to your hosting control panel and open Cron Jobs.
  2. Choose the schedule (minute, hour, day, month, weekday).
  3. Enter the command, for example:
    php /home/USERNAME/domains/yourdomain.com/public_html/cron.php
  4. Save.

Tip for WordPress: replace the built-in WP-Cron with a real cron job for better performance: add define('DISABLE_WP_CRON', true); to wp-config.php and schedule wp-cron.php every 5–15 minutes.

Avoid running heavy cron jobs every minute on shared hosting; this can affect your account's resources.


Was this answer helpful?

« Back