Skip to content

Knowledge Base

Creating cron jobs

A cron job runs a command or script on a schedule, for example a WordPress task or a backup.


  1. Log into DirectAdmin and open Cron Jobs under Advanced Features.
  2. Choose how often it should run, or set the minute, hour, day, month and weekday fields.
  3. Enter the command, for example php /home/username/domains/example.com/public_html/cron.php.
  4. Click Create.

Tips

  • Use the full path to the program and the script.
  • Run jobs only as often as you need, since frequent jobs use up your resources, see Understanding web hosting resource usage.
  • To stop an email being sent for every run, add > /dev/null 2>&1 to the end of the command.

WordPress sites can use a real cron job instead of WP-Cron, which runs when visitors arrive.

Please rate this article to help us improve our Knowledge Base.

0 0