# Scheduling Reports in AdapTable

Canonical page: https://www.adaptabletools.com/docs/handbook-exporting-scheduling

- Scheduling in AdapTable allows Reports to be run at a chosen time
- Report schedules are stored in `Export.ReportSchedules` and managed from the Export module

AdapTable allows you to **schedule** [Reports](https://www.adaptabletools.com/docs/handbook-exporting/index.md) to be sent at specific times and days.

Each schedule uses one of two timing models:

- **Recurring** — a standard 5-field `CronExpression` (e.g. weekdays at 09:30 → `30 9 * * 1-5`)
- **One-off** — a single run at a specified ISO datetime

This is useful if you need regularly to export data at a particular time, e.g. an "End of Day" report

When configuring a Schedule you will select 4 element:
- Report (System or Custom)
- Report Format
- Destination (System or Custom)
- Schedule (recurring or one-off)

- Prior to [Version 23.0](https://www.adaptabletools.com/support/version-230-release-note) Schedules were stored in a separate Schedule section of State
- Now the `ReportSchedules` section in Export State persists them to ensure everything report related is ine one place

**Example: Schedules**

Scheduling Reports in AdapTable

- This example provides two Report Schedules in Export Initial State:
  - **Weekday Excel export** — recurring cron (`30 17 * * 1-5`) for the *Current Layout* system report
  - **One-off CSV export** — runs once (~1 minute after load) for the *JavaScript Frameworks* [Custom Report](https://www.adaptabletools.com/docs/handbook-exporting-reports-custom/index.md)
- We listen to the [Report Schedule Ran Event](https://www.adaptabletools.com/docs/technical-reference-exporting/index.md) and output an appropriate [System Status Message](https://www.adaptabletools.com/docs/handbook-system-status-message/index.md)

- Edit the weekday schedule and change the cron time or destination
- Suspend the one-off schedule before it fires if you do not want a download

Demo project (Vanilla); the files without a marker are shown below:

```text
src/
  adaptableOptions.ts
  agGridModules.ts     [template]
  columnDefs.ts        [template]
  gridOptions.ts       [template]
  index.ts             [template]
  onAdaptableReady.ts
  rowData.ts           [template]
  styles.css           [template]
index.html             [template]
package.json           [template]
tsconfig.json          [template]
```

Files marked `[template]` are the same in every demo; see the [demo template](https://www.adaptabletools.com/llms/demo-template.md#vanilla).

**`src/adaptableOptions.ts`**

```ts
import {AdaptableOptions} from '@adaptabletools/adaptable';
import {WebFramework} from './rowData';

const nowMinutes = new Date().getMinutes();

export const adaptableOptions: AdaptableOptions<WebFramework> = {
  primaryKey: 'id',
  adaptableId: 'Report Schedules',
  initialState: {
    Dashboard: {
      ModuleButtons: ['Export'],
      PinnedToolbars: ['Export', 'SystemStatus'],
    },
    StatusBar: {
      StatusBars: [
        {
          Key: 'Center Panel',
          StatusBarPanels: ['Export'],
        },
      ],
    },
    Theme: {CurrentTheme: 'dark'},
    Export: {
      Reports: [
        {
          Name: 'JavaScript Frameworks',
          ReportColumnScope: 'AllColumns',
          ReportRowScope: 'ExpressionRows',
          Expression: '[language] = "JavaScript"',
        },
      ],
      ReportSchedules: [
        {
          Name: 'Weekday Excel export',
          ReportName: 'Current Layout',
          ReportFormat: 'Excel',
          ExportDestination: 'Download',
          Schedule: {
            IsOneOff: false,
            CronExpression: '30 17 * * 1-5',
          },
        },
        {
          Name: 'One-off CSV export',
          ReportName: 'JavaScript Frameworks',
          ReportFormat: 'CSV',
          ExportDestination: 'Download',
          Schedule: {
            IsOneOff: true,
            RunAt: (() => {
              const d = new Date();
              d.setMinutes(nowMinutes + 1, 0, 0);
              return d.toISOString();
            })(),
          },
        },
      ],
    },
    Layout: {
      CurrentLayout: 'Standard Layout',
      Layouts: [
        {
          TableColumns: [
            'name',
            'language',
            'github_stars',
            'license',
            'has_projects',
            'has_pages',
            'created_at',
            'has_wiki',
            'updated_at',
            'pushed_at',
            'github_watchers',
            'week_issue_change',
          ],
          Name: 'Standard Layout',
          AutoSizeColumns: true,
        },
      ],
    },
  },
};
```
**`src/onAdaptableReady.ts`**

```ts
import { AdaptableReadyInfo, ReportScheduleRanInfo } from '@adaptabletools/adaptable';

export const onAdaptableReady = (info: AdaptableReadyInfo) => {
  info.adaptableApi.eventApi.on(
    'ReportScheduleRan',
    (eventInfo: ReportScheduleRanInfo) => {
      const reportSchedule = eventInfo.reportSchedule;
      const scheduleName = reportSchedule?.Name ?? 'Report schedule';
      const reportName = reportSchedule?.ReportName ?? 'report';
      const ranAt = "JW TODO";//  new Date(eventInfo.RanAt).toLocaleString();

      info.adaptableApi.systemStatusApi.setSuccessSystemStatus(
        `${scheduleName}: ${reportName} export ran`,
        `Triggered at ${ranAt}`
      );
    }
  );
};
```

## Configuring Report Schedules

Report Schedules are defined, and persisted, in the `ReportSchedules` section of [Export Initial State](https://www.adaptabletools.com/docs/technical-reference-exporting/index.md).

### Anatomy of a Report Schedule

The [`ReportSchedule`](https://www.adaptabletools.com/docs/reference/reportschedule.md) object contains information about the object being scheduled and is defined as follows:

| Property | Type | Description |
| --- | --- | --- |
| [ExportDestination](https://www.adaptabletools.com/docs/reference/reportschedule.md#exportdestination) | [`ExportDestinationType`](https://www.adaptabletools.com/docs/reference/exportdestinationtype.md) | Destination of Report to run on Schedule |
| [Name](https://www.adaptabletools.com/docs/reference/reportschedule.md#name) | `string` | Unique display name for this scheduled report |
| [ReportFormat](https://www.adaptabletools.com/docs/reference/reportschedule.md#reportformat) | [`ReportFormatType`](https://www.adaptabletools.com/docs/reference/reportformattype.md) | Format of Report to run on Schedule |
| [ReportName](https://www.adaptabletools.com/docs/reference/reportschedule.md#reportname) | [`ReportNameType`](https://www.adaptabletools.com/docs/reference/reportnametype.md) | Name of Report to export |
| [Schedule](https://www.adaptabletools.com/docs/reference/reportschedule.md#schedule) | [`Schedule`](https://www.adaptabletools.com/docs/reference/schedule.md) | When the export should run |
| [IsReadOnly](https://www.adaptabletools.com/docs/reference/reportschedule.md#isreadonly) | `boolean` | Sets Entity to ReadOnly (overwriting a Strategy Entitlement of &#39;Full&#39;) |
| [IsSuspended](https://www.adaptabletools.com/docs/reference/reportschedule.md#issuspended) | `boolean` | Suspends (i.e. turns off) an Adaptable Object |

The actual scheduling is provided in the [`Schedule`](https://www.adaptabletools.com/docs/reference/schedule.md) object, which is defined as follows:

| Property | Type | Description |
| --- | --- | --- |
| [CronExpression](https://www.adaptabletools.com/docs/reference/schedule.md#cronexpression) | `string` | Standard 5-field cron (minute hour day-of-month month day-of-week); e.g. weekdays at 09:30 → `30 9 * * 1-5` |
| [IsOneOff](https://www.adaptabletools.com/docs/reference/schedule.md#isoneoff) | `boolean` | `true` runs once, at `RunAt`. `false` repeats on `CronExpression`. |
| [RunAt](https://www.adaptabletools.com/docs/reference/schedule.md#runat) | `string` | ISO datetime for a one-off run (local time); set when IsOneOff is true |

### Providing Report Schedules in Export State

Report Schedules are defined in **`Export.ReportSchedules`** in Initial State (alongside custom `Reports`).

Each [`ReportSchedule`](https://www.adaptabletools.com/docs/reference/reportschedule.md) needs a display `Name`, the `ReportName` to export, `ReportFormat`, optional `ExportDestination`, and a nested [`Schedule`](https://www.adaptabletools.com/docs/reference/schedule.md) object.

The Export section will create the Report Schedule Definitions

Supply these properties to provide details of what is scheduled:

- `Name` — a unique name for the Schedule
- `ReportName` — the Report being exported in the Schedule
- `ReportFormat` — Format Type of the Report being exported
- `ExportDestination` — where the Scheduled report will be sent

Set `Schedule.IsOneOff` to `false` and provide a **5-field cron** string: `minute hour day-of-month month day-of-week`.

Example: `30 17 * * 1-5` runs at **17:30 on weekdays** (Monday–Friday).

Set `Schedule.IsOneOff` to `true` and `Schedule.RunAt` to an **ISO datetime** (local time) for the single run.

```ts [[1, 2, "Export"], [1, 3, "ReportSchedules"], [2, 5, "Name"], [2, 6, "ReportName"], [2, 7, "ReportFormat"], [2, 8, "ExportDestination"], [2, 15, "Name"], [2, 16, "ReportName"], [2, 17, "ReportFormat"], [2, 18, "ExportDestination"], [3, 9, "Schedule"], [3, 10, "IsOneOff"], [3, 11, "CronExpression"], [4, 19, "Schedule"], [4, 20, "IsOneOff"], [4, 21, "RunAt"]]
const initialState: InitialState = {
  Export: {
    ReportSchedules: [
      {
        Name: 'Weekday Excel export',
        ReportName: 'Current Layout',
        ReportFormat: 'Excel',
        ExportDestination: 'Download',
        Schedule: {
          IsOneOff: false,
          CronExpression: '30 17 * * 1-5',
        },
      },
      {
        Name: 'One-off CSV export',
        ReportName: 'JavaScript Frameworks',
        ReportFormat: 'CSV',
        ExportDestination: 'Download',
        Schedule: {
          IsOneOff: true,
          RunAt: '2026-05-19T17:30:00.000Z',
        },
      },
    ],
  },
};
```

For a one-off run at design time that fires soon after the grid loads (e.g. in a demo), compute `RunAt` dynamically (as we do in the demo above)

## Managing Schedules in the UI

Report schedules are displayed in the Schedules Tab in the Export section of the [Settings Panel](https://www.adaptabletools.com/docs/ui-settings-panel/index.md).

Additionally there is a Schedule button in the Export Toolbar, Tool Panel and Status Bar

The Schedules Tab allows you to:
- open the Wizard to create / edit Schedules
- suspend or unsuspend Schedules
- delete Report Schedules

- Deleting a **custom report** also removes every `ReportSchedule` whose `ReportName` matches that report
- The UI asks for confirmation when schedules would be removed

### Scheduling a Report in the Export Wizard

Use **Export** → **Schedules** tab → **New Schedule** (or create / edit an existing schedule):

Choose 3 properties for the schedule:
- **Report** (if you clicked New in the Export popup)
- **Name**
- **Report Format**
- **Export Destination**

The report being scheduled is shown at the top of this step.

Choose which type of Schedule you want:

- **Recurring**: pick a preset (e.g. Weekdays, Monthly) or **Custom** and enter a cron expression; set hour and minute
- **One-off**: pick the date and time for the single run (`RunAt`)

If the Destination is a Custom one that requires a Form, AdapTable displays it when the scheduled Report runs

## Report Schedule Ran Event

The [Report Schedule Ran Event](https://www.adaptabletools.com/docs/technical-reference-exporting/index.md) is triggered when a report schedule runs. 

The event payload includes full details of the Report that was run on the Schedule.

<RelatedBlogCard path="/blog/2026-07-26-scheduling-in-adaptable" />

### FAQ

**Can I schedule both system and custom reports?**
Yes, you can schedule any Report available in the grid — both system and custom reports

**How many report schedules can I define?**
There is no fixed limit; each schedule must have a unique `Name`

**Can I have multiple schedules for the same report?**
Yes — for example different formats, destinations, or run times, each with its own schedule `Name`.

**What cron format does AdapTable use?**
AdapTable uses the Standard **5-field** cron: `minute hour day-of-month month day-of-week`.
For example, `30 9 * * 1-5` is 09:30 on weekdays.
The Schedule wizard can build this from presets or you can supply a custom expression.

**What happens when a one-off schedule firesor if `RunAt` is in the past?**
The report export runs once and remains in state (so you can edit it if you wish).
AdapTable does not auto-suspend or delete the Report - that is your prerogative and responsibility.

**Can I pause a schedule without deleting it?**
Yes, use **Suspend** in the Schedules tab, or suspend functions in [Export API](https://www.adaptabletools.com/docs/technical-reference-exporting/index.md).

**What happens if I delete a custom report that has schedules?**
All `ReportSchedules` targeting that `ReportName` are removed from state when the report is deleted.

**Does a scheduled export use live grid data?**
Yes. When the schedule fires, AdapTable exports a **snapshot of current grid data** at that moment.
This is exactly the same behaviour as running the report manually at that time.

**How do I run a schedule programmatically?**
Call `applyScheduledReport(reportSchedule)` on [Export API](https://www.adaptabletools.com/docs/technical-reference-exporting/index.md).

**How do I know when a schedule ran?**
Listen for the [Report Schedule Ran Event](https://www.adaptabletools.com/docs/technical-reference-exporting/index.md) and read `reportSchedule` from the event info.

**Do you still support `DaysOfWeek`, `Hour`, and `Minute` on report schedules?**
No this was moved in [Version 23.0](https://www.adaptabletools.com/support/version-230-release-note). 
Use `CronExpression` for recurring runs and `RunAt` for one-off runs.
