# Scheduling

URL: https://docs.ablyft.com/guides/experiments/scheduling/

> Start and pause an experiment automatically at a date, after a number of participants or after a number of days.



A schedule lets ABlyft start and pause an experiment for you. This is useful if an experiment should begin at a campaign
start, run over a weekend, or end on its own once it has enough data.

There are two kinds of conditions, and you can combine them:

| Kind                | What you set                                                | What happens                                                                          |
| ------------------- | ----------------------------------------------------------- | ------------------------------------------------------------------------------------- |
| **Time-based**      | A start date and time, an end date and time, and a timezone | ABlyft **starts** the experiment at the start time and **pauses** it at the end time. |
| **Condition-based** | A number of participants and/or a number of days            | ABlyft **pauses** the experiment as soon as the first of these limits is reached.     |

Every experiment can have one schedule.

## Create a schedule

1. Open the experiment.
2. In the right column, find the card **Schedule** ("Start/end conditions"). It shows **No schedule set** as long as
   there is none.
3. Click **Create**. The window **Schedule Experiment** opens.
4. Fill in the fields you need (see the tables below). The timezone is required and prefilled. Everything else is optional, but you need at
   least one condition for the schedule to do anything.
5. Click **Apply schedule**.

The card now shows a short summary of your schedule. To change it later, click **Edit** in the same card.

### Time-based

| Field          | Description                                                                                              |
| -------------- | -------------------------------------------------------------------------------------------------------- |
| **Start date** | Day and time when the experiment should start. Day and time must be set together.                        |
| **End date**   | Day and time when the experiment should be paused. Day and time must be set together.                    |
| **Timezone**   | The timezone used to calculate the start and end times. Required. The browser's timezone is preselected. |

You cannot choose a day before today.

### Condition-based

| Field                       | Description                                                                                                   |
| --------------------------- | ------------------------------------------------------------------------------------------------------------- |
| **End amount participants** | The experiment is paused once this number of participants is reached. Leave empty for unlimited participants. |
| **End amount days running** | The experiment is paused once it has been running for this many days. Leave empty for unlimited days.         |

The number of days counts from the first start of the experiment, or from the last time its results were reset.

## What happens at runtime

ABlyft checks all schedules every minute.

* **Start:** If the experiment is a draft, in preview or paused, and the start time has been reached, ABlyft starts it.
* **End:** If the experiment is running, and the end time, the participant limit or the day limit is reached (whichever
  comes first), ABlyft pauses it.

Starting and pausing work like clicking the buttons yourself, including the
[publishing delay](https://docs.ablyft.com/guides/experiments/start-pause-stop/#publishing-delay).

> **Make the experiment ready before the start time:** A scheduled start does not replace your preparation. Check the variations, pages and goals, and test with
> [preview](https://docs.ablyft.com/guides/experiments/preview-and-qa/) beforehand. Leave the experiment as draft or preview until the schedule
> starts it.

Good to know:

* A start or end condition is used **once**. If you pause an experiment manually and start it again, the schedule does
  not pause it a second time. Change the date or time in the schedule if you want it to apply again.
* An end condition only applies while the experiment is running. If the experiment is already running when the start
  time passes, nothing happens at that time.
* When you archive an experiment, its schedule is removed.

## See which experiments have a schedule

In the experiment list, you can show the column **Schedule** (use the column toggle) and filter with **Scheduled**.

## Delete a schedule

1. Click **Edit** in the **Schedule** card.
2. Click **Delete schedule** and confirm.

Deleting the schedule does not change the status of the experiment.

Creating, editing and deleting schedules requires the role member, admin or owner.

## Next steps

- [Start, pause & finish](https://docs.ablyft.com/guides/experiments/start-pause-stop/): The experiment statuses.
- [Interpret results](https://docs.ablyft.com/guides/results/interpret-results/): How long to let an experiment run.

