Cron jobs are commands your website runs on its own, at set times or at regular intervals: a script that imports data every night, a weekly clean-up, emails sent every hour. In the dashboard: Hosting → website name → Cron.

The tab is available in plans that include cron jobs.

Add a task

  1. Click New task.
  2. Choose the Schedule:
    • every 5, 15 or 30 minutes, or every hour (at the minute you choose);
    • every day, every week or every month, at the time you choose (for months, a day from 1 to 28);
    • Custom: the five cron fields (minute, hour, day, month, day of the week), for those who know them. For example 0 */2 * * 1-5 means "every two hours, Monday to Friday".
  3. Enter the Command and click New task.

The change is applied within a few seconds; a website's first task can take up to a minute. Reload the page to see it in the list.

To change or remove it, use the ⋮ menu next to the task → Edit or Delete.

How commands run

  • In the website's www folder, as the website user: the same files you see via FTP. Paths start from there.
  • On Italian time.
  • With the website's PHP (see PHP settings) and with WP-CLI.

Examples:

CommandWhat it does
php script.phpruns a PHP script of the website (the file www/script.php)
wp cron event run --due-nowruns WordPress scheduled tasks
curl -s https://yourwebsite.com/taskopens a page of the website, as a visitor would

WordPress installed by us already has its own automatic cron: no need to add it.

Limits

  • Up to 20 tasks per website.
  • At most once every 5 minutes.
  • The command fits on one line (up to 1000 characters) and cannot contain the % character: if you need a date, put it in a script.

The log

Below the list you find the last 50 lines written by the commands, errors included. The same file is logs/cron.log in the website's logs folder, next to www. If a command does not do what you expect, look there first.

Didn't find the answer? Write to us