Scheduled tasks (cron)
A cron job runs a command regularly, at the times you set: scheduled WordPress tasks, the Laravel scheduler, clearing a cache or a maintenance script of your own.
Adding a job
- Open the site and go to the Cron jobs tab.
- Enter the Schedule and the Command, or pick one of the Templates (WordPress, Laravel).
- Click Add.
How many jobs you can add depends on your plan.
The schedule
The schedule is the usual five-field cron expression: minute, hour, day of month, month, day of week. You can use an asterisk, numbers, ranges (1-5), lists (1,15) and steps (*/15). For the day of week, both 0 and 7 mean Sunday.
| Schedule | Meaning |
|---|---|
*/15 * * * * | every fifteen minutes |
0 * * * * | at the top of every hour |
30 3 * * * | every day at 3:30 |
0 6 * * 1 | every Monday at 6:00 |
0 0 1 * * | at midnight on the first of every month |
The time zone is Europe/Budapest.
Where jobs run
- Jobs run in an isolated environment with PHP-CLI and Composer.
- The working directory is the website's
web/folder; its absolute path is/var/www/html. - For example:
php /var/www/html/wp-cron.php, or for Laravelphp /var/www/html/artisan schedule:run. - The command must be a single line of at most 512 characters.
- A run may take at most 5 minutes.
Output and failures
Each job writes to its own log file in the logs/cron/ folder. The exact path is shown next to the job, and you can download it over SFTP. The card also shows the last and the next run. If a job fails three or more times in a row, it is flagged next to the job.
We do not email about failed runs, so check the log now and then for jobs that matter.