• Wednesday, February 25, 2026

Knowledge Base

How to Set Up a Cron Job in DirectAdmin

Scheduling Automated Tasks

Cron jobs run commands or scripts automatically at scheduled times.

Creating a Cron Job

  1. Log into DirectAdmin
  2. Click Cron Jobs
  3. Set the schedule using the dropdowns or enter values manually
  4. Enter the command to run
  5. Click Add

Understanding the Schedule

FieldValuesExample
Minute0-5930 = at minute 30
Hour0-2314 = 2 PM
Day of Month1-3115 = 15th day
Month1-126 = June
Day of Week0-60 = Sunday

Use * for "every" (e.g., * in hour field = every hour)

Common Examples

  • Every hour: 0 * * * *
  • Every day at midnight: 0 0 * * *
  • Every Monday at 3 AM: 0 3 * * 1
  • Every 15 minutes: */15 * * * *

WordPress Cron Example

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

Silencing Output

Add > /dev/null 2>&1 to prevent email notifications:

/usr/local/bin/php /path/to/script.php > /dev/null 2>&1