A cron job runs a command or script automatically on a schedule, for example every hour or once a day. Websites use them for tasks such as sending scheduled emails, clearing caches or running WordPress's scheduled tasks.
Use * to mean "every", */15 to mean "every 15" and commas for a list.
| Minute | Hour | Day of month | Month | Day of week | Runs |
|---|---|---|---|---|---|
*/15 |
* |
* |
* |
* |
Every 15 minutes |
0 |
* |
* |
* |
* |
Every hour, on the hour |
30 |
2 |
* |
* |
* |
Every day at 2:30am |
0 |
9 |
* |
* |
1 |
Every Monday at 9am |
Times follow the server's time zone. Please don't run cron jobs more often than once every 5 minutes. Jobs set to run more often are adjusted and we'll let you know. See our Fair Use and Backup Policy.
Run a PHP script:
/usr/local/bin/php /home/yourusername/domains/yourdomain.com/public_html/cron.php
Run WordPress's scheduled tasks:
/usr/local/bin/php /home/yourusername/domains/yourdomain.com/public_html/wp-cron.php
Replace yourusername and yourdomain.com with your own details.
By default, anything a cron job outputs is emailed to you. To stop these emails, add this to the end of the command:
>/dev/null 2>&1