HostSlim

How do I set up a cron job?

A cron job runs a command or script automatically at fixed times, for example every 5 minutes or every night. Log in to your hosting control panel and…

  • Shared Hosting

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.

More from the knowledge base

Need something that is not on the list?

Custom builds, private VLANs, BGP sessions, multi-rack deployments. Tell us what you are running and an engineer replies, usually within the hour.