Schedule cron jobs for a website
Each hosting runs as its own system user, and that user has its own crontab. You edit it on the site’s Settings & limits tab. A WordPress site also has a switch that lets the node run WP-Cron instead of waiting for visitors.
Before you start
Section titled “Before you start”- Your account has the Manage cron jobs permission with manage access to the site. For the WP-Cron switch, you need Edit hosting config.
- You know the full path of what you want to run. A job runs as the site’s system user, not as root.
Edit the crontab
Section titled “Edit the crontab”-
Open Hostings in the sidebar, click the site, and open Settings & limits.
-
Under Scheduled tasks, open Cron jobs. The summary reads
empty crontaborcrontab set. -
Enter the lines in standard cron syntax, for example:
0 3 * * * /usr/bin/php /home/<system-user>/<domain>/htdocs/cron.php >/dev/null 2>&1 -
Click Save crontab and confirm.
Lines that contain a backtick are refused.
Run WP-Cron from the server
Section titled “Run WP-Cron from the server”WordPress runs its scheduled tasks during visitor requests. With this option on, the node runs the due events every 5 minutes, so scheduled tasks take no PHP worker from visitors.
- On Settings & limits, find PHP-FPM & DB limits.
- Tick or untick Run WP-Cron from the server. The option shows once WordPress is installed, and it is on unless you turn it off.
- Click Save limits.
The node does not run WP-Cron on a site kept out of search engines, such as a staging copy, because a copy of a shop would then send its reminders and renew its subscriptions again. Such a site keeps WordPress’s own cron. The same applies to a site whose Hyperion plugin was set to report only.
Check that it worked
Section titled “Check that it worked”The page shows “Crontab saved.” On the node, list what the user has:
sudo crontab -l -u <system-user>For WP-Cron, the card shows Last ran with a time.
If it fails
Section titled “If it fails”- “line N contains backtick — refused for safety”: use
$(...)in a script file that the job calls, and keep the crontab line itself free of backticks. - The note “It kept failing on this site, so WordPress is running its own cron again. Hyperion tries once more within a day.” means the runs failed. WordPress itself still runs the events. Check the site with Repair a broken WordPress site.