> ## Documentation Index
> Fetch the complete documentation index at: https://docs.corehost.store/llms.txt
> Use this file to discover all available pages before exploring further.

# Schedules

> Automate server tasks like restarts, commands, and backups using cron-based schedules.

## Overview

**Schedules** let you automate recurring tasks on your server — such as sending commands, triggering power actions, or creating automatic backups — without any manual intervention. Schedules run on a cron-based timer, giving you precise control over when and how often tasks execute.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/corehost/images/31695.png" alt="Core Host Schedules page — empty state" />
</Frame>

<CardGroup cols={3}>
  <Card icon="clock" iconType="solid" title="Cron-based Timing">
    Define exactly when your schedule runs using flexible cron syntax.
  </Card>

  <Card icon="list-check" iconType="solid" title="Multiple Tasks">
    Chain multiple tasks together in a single schedule with time offsets.
  </Card>

  <Card icon="bolt" iconType="solid" title="Three Action Types">
    Send commands, trigger power actions, or create automatic backups.
  </Card>
</CardGroup>

***

## Creating a Schedule

Click the **Create schedule** button in the top right corner of the Schedules page to open the creation modal.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/corehost/images/31696.png" alt="Create new schedule modal" />
</Frame>

<Steps>
  <Step title="Enter a schedule name">
    Give your schedule a descriptive, human-readable name — for example, `Daily Restart` or `Hourly Backup`. This makes it easy to identify in your schedule list.
  </Step>

  <Step title="Set the cron timing">
    Use the five cron fields to define when the schedule should run:

    | Field            | Description               | Default |
    | ---------------- | ------------------------- | ------- |
    | **Minute**       | Which minute(s) to run    | `*/5`   |
    | **Hour**         | Which hour(s) to run      | `*`     |
    | **Day of Month** | Which day(s) of the month | `*`     |
    | **Month**        | Which month(s)            | `*`     |
    | **Day of Week**  | Which day(s) of the week  | `*`     |

    <Tip>
      Toggle **Show Cheatsheet** in the modal to reveal a built-in reference with examples and special character definitions — see below for the full breakdown.
    </Tip>
  </Step>

  <Step title="Configure schedule behaviour">
    Two toggles control how the schedule behaves at runtime:

    * **Only When Server is Online** — When enabled, the schedule will only execute if the server is currently in a running state. Recommended for command-based tasks.
    * **Schedule Enabled** — When enabled, the schedule will execute automatically at the defined interval. Disable this to pause a schedule without deleting it.
  </Step>

  <Step title="Click Create schedule">
    Click **Create schedule** to save. The schedule will appear in your list and begin running at the next matching cron interval.
  </Step>
</Steps>

***

## Cron Syntax Reference

The schedule system uses standard **Cronjob syntax**. Toggle **Show Cheatsheet** in the creation modal to see this reference inline.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/corehost/images/31697.png" alt="Cron cheatsheet expanded in the schedule modal" />
</Frame>

### Special Characters

<AccordionGroup>
  <Accordion title="* — Any value">
    Matches every possible value for that field. For example, `*` in the Hour field means "every hour".
  </Accordion>

  <Accordion title=", — Value list separator">
    Separates multiple values. For example, `1,3,5` in the Day of Week field means Monday, Wednesday, and Friday.
  </Accordion>

  <Accordion title="- — Range of values">
    Defines a range. For example, `8-12` in the Hour field means every hour from 8 AM to 12 PM.
  </Accordion>

  <Accordion title="/ — Step values">
    Defines intervals. For example, `*/5` in the Minute field means every 5 minutes. `*/2` in the Hour field means every 2 hours.
  </Accordion>
</AccordionGroup>

### Common Examples

| Cron Expression | What It Does                      |
| --------------- | --------------------------------- |
| `*/5 * * * *`   | Every 5 minutes                   |
| `0 */1 * * *`   | Every hour (at minute 0)          |
| `0 8-12 * * *`  | Every hour between 8 AM and 12 PM |
| `0 0 * * *`     | Once a day at midnight            |
| `0 0 * * MON`   | Every Monday at midnight          |

<Tip>
  Use a tool like [crontab.guru](https://crontab.guru) to build and validate cron expressions before entering them in the panel.
</Tip>

***

## Managing Schedules

Once created, your schedules appear as cards in the Schedules list. Each card shows the schedule name, its active status, the last and next run times, and the cron field breakdown.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/corehost/images/31698.png" alt="Schedule detail view showing cron fields, tasks, and controls" />
</Frame>

Each schedule card includes:

<AccordionGroup>
  <Accordion title="Schedule name and status badge">
    The name you gave the schedule, alongside an **ACTIVE** or **INACTIVE** badge showing whether it is currently enabled.
  </Accordion>

  <Accordion title="Last run / Next run">
    Shows when the schedule last executed and when it is next due to run (e.g. `Next run at: Mar 2nd at 12:05AM`). If the schedule has never run, Last run will show `n/a`.
  </Accordion>

  <Accordion title="Cron field display">
    A visual breakdown of the five cron fields (Minute, Hour, Day of Month, Month, Day of Week) so you can confirm the schedule timing at a glance.
  </Accordion>

  <Accordion title="Edit button">
    Opens the schedule settings so you can update the name, cron timing, or toggle options.
  </Accordion>

  <Accordion title="New Task button">
    Add a new task to this schedule. A schedule can contain multiple tasks that run in sequence.
  </Accordion>

  <Accordion title="Delete button">
    Permanently removes the schedule and all its tasks. This cannot be undone.
  </Accordion>

  <Accordion title="Run Now button">
    Triggers the schedule immediately, regardless of the cron timer. Useful for testing that your schedule and tasks work correctly.
  </Accordion>
</AccordionGroup>

***

## Adding Tasks to a Schedule

A schedule on its own does nothing — you need to add at least one **task** to define what action it performs. Click **New Task** on any schedule card to open the task creation modal.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/corehost/images/31699.png" alt="Create Task modal showing the three action types" />
</Frame>

### Task Fields

<AccordionGroup>
  <Accordion title="Action">
    Choose what the task should do. There are three action types available — see below for details.
  </Accordion>

  <Accordion title="Time Offset (in seconds)">
    The number of seconds to wait after the previous task finishes before this task runs. Set to `0` for no delay. If this is the first task in the schedule, the offset is ignored.
  </Accordion>

  <Accordion title="Continue on Failure">
    When enabled, subsequent tasks in the schedule will still run even if this task fails. Useful for non-critical tasks in a chain.
  </Accordion>
</AccordionGroup>

### Action Types

<CardGroup cols={3}>
  <Card icon="terminal" iconType="solid" title="Send Command">
    Sends a command directly to the server console — exactly like typing in the Console terminal. Enter the command in the **Payload** field (no leading `/` needed).
  </Card>

  <Card icon="power-off" iconType="solid" title="Send Power Action">
    Triggers a power state change on the server. Options include **Start**, **Restart**, **Stop**, and **Kill**.
  </Card>

  <Card icon="box-archive" iconType="solid" title="Create Backup">
    Automatically creates a server backup. This uses one of your 10 available backup slots — make sure you have a free slot available when the schedule runs.
  </Card>
</CardGroup>

***

## The Send Command Task

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/corehost/images/31701.png" alt="Create Task modal with Send Command selected and Payload field visible" />
</Frame>

When **Send command** is selected as the action, a **Payload** field appears. Enter the server command you want to run — for example:

```bash theme={null}
say Server restarting in 5 minutes!
save-all
```

<Info>
  Commands in the Payload field are sent directly to the server console and run with full operator privileges. Do not include a leading `/`.
</Info>

***

## Viewing Tasks on a Schedule

Once tasks are added to a schedule, they appear as rows within the schedule card, showing the action type, payload, and edit/delete controls.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/corehost/images/31702.png" alt="Schedule card with a Send Command task attached, showing Delete and Run Now buttons" />
</Frame>

Each task row shows:

* The **action type icon** and label (e.g. `SEND COMMAND`)
* The **payload** or parameter (e.g. the command text or power action)
* An **edit** button (pencil icon) to modify the task
* A **delete** button (trash icon) to remove the task

The schedule card also shows **Delete** and **Run Now** buttons at the bottom, letting you remove the entire schedule or trigger it immediately for testing.

***

## Example: Automated Daily Restart

Here is a practical example of setting up a daily restart schedule with player warnings:

<Steps>
  <Step title="Create the schedule">
    Name it `Daily Restart` and set the cron to `0 4 * * *` (runs every day at 4:00 AM). Enable **Only When Server is Online** and **Schedule Enabled**.
  </Step>

  <Step title="Add a warning command (Task 1)">
    Action: **Send command** — Payload: `say Server restarting in 5 minutes!` — Time offset: `0`
  </Step>

  <Step title="Add a second warning (Task 2)">
    Action: **Send command** — Payload: `say Server restarting in 1 minute — please save your progress!` — Time offset: `240` (4 minutes after Task 1)
  </Step>

  <Step title="Add the save command (Task 3)">
    Action: **Send command** — Payload: `save-all` — Time offset: `60` (1 minute after Task 2)
  </Step>

  <Step title="Add the restart action (Task 4)">
    Action: **Send power action** — Select **Restart** — Time offset: `5` (5 seconds after Task 3)
  </Step>
</Steps>

<Tip>
  Test your schedule before relying on it by clicking **Run Now** after setting it up. Check the Console page to confirm each task executed as expected.
</Tip>

***

## Quick Reference

<CardGroup cols={2}>
  <Card icon="calendar-plus" iconType="solid" title="Create a schedule">
    Click **Create schedule**, fill in the name and cron fields, and click **Create schedule**.
  </Card>

  <Card icon="list-check" iconType="solid" title="Add a task">
    Click **New Task** on any schedule card, choose an action type, and click **Create Task**.
  </Card>

  <Card icon="play" iconType="solid" title="Test a schedule">
    Click **Run Now** on the schedule card to trigger it immediately without waiting for the cron timer.
  </Card>

  <Card icon="pen" iconType="solid" title="Edit a schedule or task">
    Click **Edit** on the schedule card or the pencil icon on any task row.
  </Card>

  <Card icon="pause" iconType="solid" title="Pause a schedule">
    Click **Edit** and disable the **Schedule Enabled** toggle. The schedule will stop running but remain saved.
  </Card>

  <Card icon="trash" iconType="solid" title="Delete a schedule">
    Click **Delete** on the schedule card. This permanently removes the schedule and all its tasks.
  </Card>
</CardGroup>

***

## Frequently Asked Questions

<AccordionGroup>
  <Accordion title="How many schedules can I create?">
    There is no hard limit on the number of schedules you can create per server. However, running many simultaneous schedules with frequent intervals may impact server performance.
  </Accordion>

  <Accordion title="Can I chain multiple tasks together?">
    Yes — a single schedule can have multiple tasks. Each task runs in order, and you can use the **Time Offset** field to add delays between them. This is useful for sending warnings before a restart, for example.
  </Accordion>

  <Accordion title="What happens if a task fails?">
    By default, if a task fails, subsequent tasks in the schedule will not run. Enable **Continue on Failure** on a task to allow the chain to continue even if that task encounters an error.
  </Accordion>

  <Accordion title="What does 'Only When Server is Online' do?">
    When enabled, the entire schedule will be skipped if the server is not in a running state at the time it is due to execute. This prevents tasks like send command from failing against an offline server.
  </Accordion>

  <Accordion title="Can I use schedules to create automatic backups?">
    Yes — add a **Create Backup** task to any schedule. Make sure you have free backup slots available when the schedule runs, or the backup task will fail.
  </Accordion>

  <Accordion title="My schedule is not running — what should I check?">
    First, confirm the **Schedule Enabled** toggle is on. Next, verify your cron expression is correct using [crontab.guru](https://crontab.guru). If **Only When Server is Online** is enabled, check that your server is actually running at the scheduled time.
  </Accordion>

  <Accordion title="Can I run a schedule manually?">
    Yes — click the **Run Now** button on any schedule card to trigger it immediately. This is useful for testing before relying on the automated timer.
  </Accordion>
</AccordionGroup>

***

## Need Help?

<Card icon="headset" iconType="solid" href="/support" title="Contact Support">
  Our support team is available 24/7. Reach out if you need help setting up schedules, debugging tasks, or understanding cron syntax.
</Card>
