# Scheduled tasks (cron jobs)

> Run a command automatically on a schedule.

Source: https://veldhost.eu/docs/cron-jobs

Scheduled tasks run a command automatically — cleanups, imports, queue processing. Site → **PHP** tab → *Scheduled tasks*.

## The schedule field

Five values: minute, hour, day-of-month, month, weekday. `*` means "every".

```
*/5 * * * *     every 5 minutes
0 3 * * *       daily at 03:00
0 8 * * 1       Mondays at 08:00
```

## The command

Commands start with `php` or `wp` and run inside your site directory as your app user:

```
php artisan queue:work --stop-when-empty
php scripts/cleanup.php
wp post list --post_status=draft
```

Up to 5 jobs per site. Changes go live within a minute. Output is discarded — log to a file from your script if you need history, and remember the [Logs tab](https://veldhost.eu/docs/site-logs) shows PHP errors your job throws.
