How to manage Cron Jobs in DirectAdmin Print

  • 0

Overview

Cron Jobs allow you to automate tasks on your website, such as running scripts, clearing temporary files, sending email reports, or executing backups. DirectAdmin includes an easy-to-use Cron Manager.

Where to find Cron Jobs

Log in to DirectAdmin → Advanced Features → Cron Jobs

How to create a new Cron Job

  1. Open the Cron Jobs page
  2. Click Create Cron Job
  3. Set the schedule (minute, hour, day, month, weekday)
  4. Enter the command you want to run
  5. Click Create

Common schedule examples

Run a script every day at midnight

0 0 * * * php -q /home/username/domains/yourdomain.com/public_html/script.php

Run a script every 5 minutes

*/5 * * * * php -q /path/to/cron.php

WordPress Cron replacement (recommended)

*/5 * * * * php -q /home/username/domains/yourdomain.com/public_html/wp-cron.php

Email notifications for Cron Jobs

To receive email output from a Cron Job:

@reboot echo "Cron started"

To disable notifications, add at the end of the command:

 >/dev/null 2>&1

Troubleshooting

  • Script not executing – wrong file path.
  • Permission denied – file needs CHMOD 755.
  • PHP not found – Use the full path to the PHP binary.

Was this answer helpful?

« Back