1. Websta Hosting
PHP & Server Configuration

Setting Up Cron Jobs

Setting Up Cron Jobs

Cron jobs run commands automatically on a schedule.

Create a Cron Job

  1. DirectAdmin → Cron Jobs → Create New Cron Job.
  2. Set schedule fields (minute, hour, day, month, weekday).
  3. Enter the command.
  4. Click Add.

Schedule Reference

Schedule Cron Expression
Every 5 minutes */5 * * * *
Every hour 0 * * * *
Daily at midnight 0 0 * * *
Every Monday 9am 0 9 * * 1

WordPress WP-Cron (External)

Disable WP's built-in pseudo-cron and use a real cron job instead for better reliability:

In wp-config.php:

define('DISABLE_WP_CRON', true);

Add cron job:

*/5 * * * * /usr/local/bin/php /home/yourusername/public_html/wp-cron.php > /dev/null 2>&1

Suppress Cron Email Output

Append > /dev/null 2>&1 to any command to silence output emails:

0 * * * * your-command > /dev/null 2>&1
Still need help?

If this article didn't answer your question, our support team can help.

Contact support
All articles More in PHP & Server Configuration