---
title: "Schedule automatic backups"
url: https://phatdev.net/en/docs/sl-migrations/schedule-backup
lang: en
updated: 2026-10-20
alternate:
  vi: https://phatdev.net/docs/sl-migrations/schedule-backup
markdown: https://phatdev.net/en/docs/sl-migrations/schedule-backup.md
---

# Schedule automatic backups

Part of the doc set: [SL Migrations](https://phatdev.net/en/docs/sl-migrations.md)

> Set up recurring backups through WP-Cron or system cron.

## Create a schedule

1. **SL Migrations → Schedules → Create New**
2. Configure:
   - **Name** - the schedule name
   - **Template** - choose a package template (the default is fine)
   - **Storage** - choose one or more storages for the results
   - **Repeats** - Hourly / Daily / Weekly / Monthly
   - **Start Time** - the time of day it runs
3. **Save** → the schedule is activated immediately.

## How cron works

SL Migrations registers a WP-Cron event that runs every minute to check which schedules are due and run them. However, WordPress has no cron daemon of its own - the event only fires when one of two things happens:

### Option 1: Default WP-Cron

Every frontend pageview fires `wp-cron.php` through an HTTP loopback. If the site gets steady traffic, the schedule runs at roughly the right time.

**Limitation**: if nobody visits the site (idle), WP-Cron does not fire and the backup does not run on time.

### Option 2: System cron (recommended for important schedules)

Turn off the default WP-Cron and let the server's cron call `wp-cron.php`:

```php
// wp-config.php
define('DISABLE_WP_CRON', true);
```

Then set up a cron entry on the server. Each hosting provider does this differently:
- **Shared hosting**: use the cPanel/Plesk interface → Cron Jobs → add a line similar to the one below
- **VPS / dedicated**: edit with `crontab -e`
- **Managed WordPress hosting**: usually already set up - check with your hosting provider

Reference command (runs every minute):

```
* * * * * curl -s "https://example.com/wp-cron.php?doing_wp_cron" >/dev/null 2>&1
```

This guarantees the backup runs on time even when the site has no traffic.

## Verify the schedule is registered

Go to **SL Migrations → Schedules** → the **Next Run Time** column shows when it will run next. If you see "-" or a time in the past, the schedule has not been triggered.

## Handling failed schedules

See [Resolving schedule failures](https://phatdev.net/en/docs/sl-migrations/how-to-resolve-schedule-build-failures).
