Cron Job Management¶
Cron jobs enable scheduled execution of commands on the server. Typical use cases include regular database cleanup, email sending, or cache updates.
Overview¶
The cron job table shows all configured cron jobs:
| Column | Description |
|---|---|
| Name | Cron job name |
| Website | Associated website |
| Schedule | Cron expression (e.g. */5 * * * *) |
| Command | Command to execute |
| Status | Active or Disabled |
| Created | Creation date |
Create Cron Job¶
- Click Create Cron Job
- Fill out the form:
| Field | Required | Description |
|---|---|---|
| Subscription | Yes (Admin) | Associated hosting subscription |
| Website | Yes | Associated website |
| Name | Yes | Descriptive name |
| Schedule | Yes | Cron expression |
| Command | Yes | Command to execute |
- Click Create
Schedule Syntax (Cron Expression)¶
A cron expression consists of five fields:
┌───────────── Minute (0–59)
│ ┌───────────── Hour (0–23)
│ │ ┌───────────── Day of Month (1–31)
│ │ │ ┌───────────── Month (1–12)
│ │ │ │ ┌───────────── Day of Week (0–7, 0 and 7 = Sunday)
│ │ │ │ │
* * * * *
Common Examples¶
| Expression | Description |
|---|---|
* * * * * |
Every minute |
*/5 * * * * |
Every 5 minutes |
*/15 * * * * |
Every 15 minutes |
0 * * * * |
Every full hour |
0 */2 * * * |
Every 2 hours |
0 0 * * * |
Daily at midnight |
0 2 * * * |
Daily at 02:00 |
0 0 * * 1 |
Every Monday at midnight |
0 0 1 * * |
1st of every month at midnight |
30 4 * * 1-5 |
Monday–Friday at 04:30 |
Special Characters¶
| Character | Meaning |
|---|---|
* |
Every value |
*/n |
Every n units |
n-m |
Range from n to m |
n,m |
Specific values n and m |
Edit Cron Job¶
- Click the Edit icon
- Change name, schedule, or command
- Click Save
Enable / Disable Cron Job¶
- Use the Toggle in the action column
- Disabled cron jobs are not executed but remain configured
Delete Cron Job¶
- Click the Delete icon
- Confirm the deletion
Examples of Common Cron Jobs¶
WordPress Cron¶
WordPress wp-cron
For WordPress websites, it is recommended to run the internal wp-cron.php via a system cron and disable the WP-internal cron in wp-config.php: define('DISABLE_WP_CRON', true);
Database Cleanup¶
Call URL (HTTP Request)¶
Security¶
- Cron jobs are executed under the Linux user of the subscription
- Commands have the same permissions as the website user
open_basediranddisable_functionsalso apply to cron jobs- The maximum number of cron jobs is limited by the hosting package
Troubleshooting¶
| Problem | Solution |
|---|---|
| Cron is not executing | Check whether the cron job is enabled |
| Command fails | Test the command manually as the website user |
| Wrong PHP version | Use the full path to the desired PHP version (e.g. /usr/bin/php8.4) |
| Missing output | Redirect output to a file: >> /home/user/cron.log 2>&1 |