> For the complete documentation index, see [llms.txt](https://docs.octoxlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.octoxlabs.com/documentation/use-octoxlabs/settings/discovery-settings/discovery-schedule.md).

# Discovery Schedule

Schedule full discovery and adapter based discovery by day and time, and preview when the next runs happen.

**Discovery Schedule** decides when OctoXLabs collects data without anyone clicking a button. There are two kinds of schedules. A **Full Discovery** schedule runs a complete discovery: it fetches from your enabled connections and then aggregates the results into the inventories. An **Adapter Based Discovery** schedule runs only the connections you pick, so a slow or fast-changing source can run on its own cadence.

### Before you begin

* Required permission to open the page: `configurations.view_discoveryschedule`. To add, change or delete schedules you also need `configurations.add_discoveryschedule`, `configurations.change_discoveryschedule` or `configurations.delete_discoveryschedule`.
* For adapter based schedules, at least one connection must exist.

Go to the gear icon in the top bar > **Settings** > **Discovery Settings** > **Discovery Schedule**. The page has two tabs, **Full Discovery** and **Adapter Based Discovery**. You can add as many schedules as you like on each tab.

### Schedule fields

Each schedule is a card with these fields.

| Field              | Applies to                             | What it does                                                                                                         |
| ------------------ | -------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
| **Every x days**   | Both                                   | The weekdays the schedule runs on. Pick one or more of Sunday to Saturday. At least one day is required.             |
| **Interval Type**  | Both                                   | **Specific Time**, **Every x Hour**, or (full discovery only) **Every x Minute**.                                    |
| **Start Time**     | Full discovery, **Specific Time**      | The time of day to start.                                                                                            |
| **Time**           | Adapter based, **Specific Time**       | The hour (00 to 23) and minute (00, 15, 30 or 45) to start.                                                          |
| **Interval**       | **Every x Hour** or **Every x Minute** | For hours, 2 to 11. For minutes, 15 or 30.                                                                           |
| Connections picker | Adapter based                          | Which connections the schedule runs. The placeholder reads **All Connections**. At least one connection is required. |
| **Enabled**        | Both                                   | Select to run the schedule. Clear it to keep the schedule but pause it.                                              |

Interval schedules run on the clock, not from the time you save. **Every x Hour** runs at minute 0 of the hours that are multiples of the interval (every 2 hours runs at 00:00, 02:00, 04:00 and so on; every 3 hours at 00:00, 03:00, 06:00), and **Every x Minute** runs at the minutes that are multiples of the interval in every hour. Times use the server's time zone.

Next to the fields, **Discovery Schedule Date Preview** lists the next four run times for what you have entered. If you see a warning to select days and an interval type, fill in those fields first.

### Add a schedule

{% stepper %}
{% step %}

#### Add a card

Pick the tab, then click **Add Schedule**. A new card with an orange border appears at the bottom.
{% endstep %}

{% step %}

#### Fill in the card

Choose the days and the interval type, then the time or interval. On the **Adapter Based Discovery** tab, also pick the connections.
{% endstep %}

{% step %}

#### Save

Click **Save**. The button stays disabled until you have changed something and selected the required fields. The card then gets a normal border.
{% endstep %}
{% endstepper %}

To change a schedule, edit its card and click **Save**. To remove it, click **Delete Schedule** and confirm. Deleting a schedule that was never saved just removes the card.

### Preview the calendar

Click **Preview** to open **Schedule Preview**, a weekly calendar of run times. By default it shows enabled, non-recurring schedules of the current tab. Use the check boxes to include **Show Disabled**, **Recurring Events** (hourly and minute schedules), and the other tab (**Adapter Based Schedules** or **Full Discovery Schedules**). On the adapter based tab you can also filter by adapter.

### What happens when a schedule fires

A full discovery schedule creates a discovery run started by the built-in `system` user. Before it starts, the platform checks disk usage. If disk usage is at or above the limit (80 percent by default), the run is skipped, a warning is logged and, if SMTP and the admin e-mail are configured, the administrator is e-mailed. Check System Information if scheduled runs stop appearing.

{% hint style="info" %}
The **Add Adapterized Adapters to Full Discovery** option in Advanced Settings controls whether connections that have their own adapter based schedule also run during full discovery.
{% endhint %}

### Verify the result

* The card has no orange border and **Save** is disabled.
* **Preview** shows the schedule in the calendar.
* After the first run time, the discovery history shows a new run.

### Troubleshooting

| Symptom or error message                                                                                               | Cause                                                                              | Fix                                                                                |
| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| **Save** is disabled                                                                                                   | No day is selected, nothing changed, or (adapter based) no connection is selected. | Select at least one day and, for adapter based schedules, at least one connection. |
| The date preview shows a warning                                                                                       | Days or interval type are missing.                                                 | Select days and an interval type.                                                  |
| Scheduled discovery does not start                                                                                     | The schedule is not **Enabled**, or disk usage is at the limit.                    | Select **Enabled**, and free disk space.                                           |
| `For hour interval type, interval must be between 1 and 11.` or `For minute interval type, interval must be 15 or 30.` | The interval is outside the allowed range.                                         | Use an hour interval of 2 to 11 or a minute interval of 15 or 30.                  |

### What's next?

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Discovery Ordering</strong></td><td>Choose which adapter wins when sources disagree.</td><td></td></tr><tr><td><strong>Discovery and Aggregation</strong></td><td>What a discovery run does.</td><td></td></tr><tr><td><strong>Advanced Settings</strong></td><td>Retention and discovery behaviour options.</td><td></td></tr><tr><td><strong>System Information</strong></td><td>Check disk and memory.</td><td></td></tr></tbody></table>
