> For AI agents: the complete documentation index is available at https://docs.heys.ai/workstation/en/llms.txt, the full documentation bundle is available at https://docs.heys.ai/workstation/en/llms-full.txt.

# Cron Jobs and Notifications

Some things should happen automatically at a set time: checking data every morning, summarizing the weekly report every Friday, reminding you tomorrow afternoon to hand in materials. This page covers three things that work together:

- **Cron jobs**: a task goal + a run time; when the time comes, the AI runs it automatically;
- **Notifications**: the results and reminders of cron jobs and Cases are delivered here;
- **Notification channels and system notifications**: pushing notifications on to your own systems (webhooks), and the desktop alerts shown when a task finishes.

## The Cron Jobs page \{#the-cron-jobs-page}

Cron Jobs is a top-level page in the icon rail (the clock icon). The Cron Jobs page has no sidebar; the main area sits right next to the icon rail. The page header shows "N total", and **New Cron Job** is at the top right.

<figure>

![The Cron Jobs page: two cron jobs, "每日数据巡检" (daily data check; 0 9 \* \* \*, next run 2026/11/26 09:00:00, last run Running) and "周报摘要" (weekly report summary; 0 18 \* \* 5, next run 2026/11/27 18:00:00, last run ✓ 2 minutes ago), both in the project "季度经营分析" (quarterly business analysis), both with the status switch On](/screenshots/en/p13-定时任务.webp)

<figcaption>The Cron Jobs page: two cron jobs, "每日数据巡检" (daily data check; 0 9 * * *, next run 2026/11/26 09:00:00, last run Running) and "周报摘要" (weekly report summary; 0 18 * * 5, next run 2026/11/27 18:00:00, last run ✓ 2 minutes ago), both in the project "季度经营分析" (quarterly business analysis), both with the status switch On</figcaption>
</figure>

| Column       | Description                                                                                                                                                                                                                                                                   |
| ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Name**     | The name; the line below shows the beginning of the goal                                                                                                                                                                                                                      |
| **Schedule** | The run-time expression, for example `0 9 * * *` (every day at 9:00) or `0 18 * * 5` (every Friday at 18:00)                                                                                                                                                                  |
| **Next Run** | When it runs next                                                                                                                                                                                                                                                             |
| **Last Run** | While it is running, it shows **Running**; afterwards it shows whether it succeeded (✓) or failed, and how long ago; a run executed on another computer shows **Skipped** (see [Running on only one computer with cloud sync](#running-on-only-one-computer-with-cloud-sync)) |
| **Project**  | The project it is bound to                                                                                                                                                                                                                                                    |
| **Status**   | The on/off switch. When off, it no longer runs on schedule; its settings and history are kept                                                                                                                                                                                 |

The list shows the current space. Each cron job has its own session; each scheduled run is a new task in that session. These sessions do not appear in the sidebar or in search; view them on this page or on the project detail page.

## New Cron Job \{#new-cron-job}

Click **New Cron Job** at the top right:

<figure className="narrow">

![The New Cron Job dialog: Name (Optional, for easy identification), Goal, Schedule (hint: e.g. "every day at 9am" or "0 9 \* \* \*", with Parse on the right), Run once (Auto-disables after one run), Notifications (Default (notify on failure) or Custom), Project (No project), Space (default), Keep Runs (50)](/screenshots/en/c35-新建定时任务.webp)

<figcaption>The New Cron Job dialog: Name (Optional, for easy identification), Goal, Schedule (hint: e.g. "every day at 9am" or "0 9 * * *", with Parse on the right), Run once (Auto-disables after one run), Notifications (Default (notify on failure) or Custom), Project (No project), Space (default), Keep Runs (50)</figcaption>
</figure>

| Field             | Description                                                                                                                                                                                |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Name**          | Optional, for easy identification                                                                                                                                                          |
| **Goal**          | Required. The task goal handed to the AI on each run, written just like any other task                                                                                                     |
| **Schedule**      | Required. You can use natural language such as "every day at 9am" or "every Monday at 8am", or write a 5-field cron expression directly, such as `0 9 * * *`                               |
| **Run once**      | When ticked, the job disables itself after one run                                                                                                                                         |
| **Notifications** | **Default (notify on failure)** or **Custom**; see [Notification policy](#notification-policy)                                                                                             |
| **Project**       | When bound, the task runs in that project's folder, can read and write the project's files, and brings along the project memory. With **No project**, it runs in the cron job's own folder |
| **Space**         | Which space's model settings and data to use. Hidden spaces do not appear here (one that is already selected is still shown)                                                               |
| **Keep Runs**     | How many recent runs to keep in the history, 50 by default. Older records beyond that are cleaned up along with their outputs                                                              |

After writing the schedule, click **Parse**: natural language is turned into a cron expression, and the **Expression** and the next few run times are shown. Check them before saving.

The 5 fields of a cron expression are, in order: minute, hour, day of month, month, day of week (both 0 and 7 are Sunday). Some common patterns:

| Expression     | Meaning                            |
| -------------- | ---------------------------------- |
| `0 9 * * *`    | Every day at 9:00                  |
| `30 8 * * 1-5` | Weekdays at 8:30                   |
| `0 18 * * 5`   | Every Friday at 18:00              |
| `0 10 1 * *`   | On the 1st of every month at 10:00 |
| `*/30 * * * *` | Every 30 minutes                   |

### One-time jobs

A cron expression cannot express "run only once" by itself, so there is a separate **Run once** switch: when ticked, the job runs once when the time comes and then disables itself whether it succeeds or fails. It carries a **Once** badge in the list.

You can also just say it in a conversation; the AI creates the cron job itself and decides whether it should be one-time:

```
明天下午 5 点提醒我把周报发给王经理。
每周一早上 9 点把上周 data/ 目录里新增的 CSV 汇总一下。
```

(The first line: "Remind me at 5 pm tomorrow to send the weekly report to Manager Wang." The second: "Every Monday at 9 am, summarize the CSV files added to the data/ folder last week.")

The first sentence gives you a one-time job that sends its result to Notifications when the time comes; the second is a recurring job. Both show up on the Cron Jobs page after they are created, where you can change them.

:::tip Tip
Scheduled reports you set up with the Sprite in channels such as WeChat or Feishu are sent back to that same channel on every run ([Sprite](https://docs.heys.ai/workstation/en/sprite.md)).
:::

### Details, Run Now and Run History

Click a row in the list to open its details:

- **Run Now**: runs it once right away, without waiting for the scheduled time;
- **Edit**: change any of the fields above;
- **Delete**: also deletes all run history and outputs. This cannot be undone;
- **Schedule and settings**: expression, next run, whether it runs once, project, space and so on; with cloud sync on there is also **Runs on** ([Running on only one computer with cloud sync](#running-on-only-one-computer-with-cloud-sync));
- **Run History**: the time and result of every run. Open one to see the full run and answer.

### How cron jobs differ from regular tasks

When a cron job runs, nobody is on hand to answer questions, so:

| Capability                                            | In a cron job                                                                 |
| ----------------------------------------------------- | ----------------------------------------------------------------------------- |
| Question cards                                        | None; the AI does not stop to ask you                                         |
| Memory                                                | Read-only: included at the start of the task as usual, but nothing is written |
| Rewinding to a message                                | Not available                                                                 |
| Image generation, charts, web search, knowledge bases | Available as usual                                                            |

Each run takes the history of this cron job's previous few runs into account, so a monitoring job can say "3 new errors compared with yesterday", while never skipping a run because "this was done last time".

:::note Note
Cron jobs are scheduled by HeyS itself, so the desktop app needs to keep running for them to run on time. On Windows, clicking the close button by default only hides the window in the tray, and cron jobs keep running; right-click the tray icon and choose **Quit** to really quit ([Installation, Signing In to Your Organization and Updates](https://docs.heys.ai/workstation/en/installation-sign-in-and-updates.md)). HeyS deployed on a server runs all the time and is not affected. A run that is in progress when you sign out is recorded as failed.
:::

## Notification policy \{#notification-policy}

Who gets notified after a cron job runs, and about what, is decided by each cron job's **Notifications** setting:

| Choice                      | Behavior                                                                                                                                                                              |
| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Default (recurring job)** | Sends to Notifications only when **a run fails**; shown as **Default (notify on failure)**                                                                                            |
| **Default (one-time job)**  | Sends to Notifications on **both completion and failure**; shown as **Default (one-shot: notify on completion or failure)**                                                           |
| **Custom**                  | Tick the **Events** (**Run completed**, **Run failed**) and the **Channels** (Notifications, webhook channels) yourself. Selecting no channel at all = no notifications are delivered |

Recurring jobs do not notify on success by default, because success notifications from a frequent job are just noise; one-time jobs are different: "tell me when it is done" is the whole point of them.

**The final answer is written in full into the notification body** (truncated when very long). So for a request like "put together the industry news every morning and send it to me", creating a cron job with notifications set to **Custom** and ticking **Run completed** and **Notifications** is all you need; the AI does not have to perform a separate "send" action.

Notifications for Cases are set in the template (the **Notification channels** in [Cases](https://docs.heys.ai/workstation/en/cases.md)). A Case notifies when it stops for your input, waits for you to confirm the next step, finishes, or fails.

## Running on only one computer with cloud sync \{#running-on-only-one-computer-with-cloud-sync}

When your organization has cloud sync and the space has **Sync to cloud** turned on ([Spaces, Appearance and General Settings](https://docs.heys.ai/workstation/en/spaces-appearance-and-general-settings.md), [Data, Cloud Sync and Troubleshooting](https://docs.heys.ai/workstation/en/data-cloud-sync-and-troubleshooting.md)), the cron jobs of that space show up on every one of your computers. To avoid running them twice, **each cron job runs on only one computer**:

- The edit dialog and the details gain a **Runs on** line: "Runs on this computer" when it runs here, and "Runs on _XX_" when it runs on another computer;
- To move it to this computer, click **Run on this computer** next to it; you see "Now runs on this computer";
- When the time comes, the computers that are not the run device record that run as **Skipped**; hover to see why. Skipped **is not a failure**, and no failure notification is sent.

Without cloud sync, or when this space is not synced, **Runs on** is not shown, and each computer runs its own cron jobs.

## Notifications \{#notifications}

**Notifications** is at the top of the Home sidebar: the **bell** to the right of the logo, with the unread count on it. When the sidebar is collapsed and there are unread notifications, a small dot appears on the collapse button. You can also choose **Open Notifications** in the **Actions** category of ⌘K search.

:::note Note
This page used to be called the Inbox. From this version on it is called **Notifications**, and "inbox" only means the inbox folder in Mail ([Mail](https://docs.heys.ai/workstation/en/mail.md)). Emails do not go to Notifications; alerts for new emails come as system notifications.
:::

<figure>

![Notifications: the blue dot and the number 9 next to the page title Notifications are the unread count, with Mark all read at the top right; the filters All / Unread and All sources / Cron / Case; the list contains notifications for the cron job "周报摘要" (weekly report summary), one completed (Completed) and one failed (Failed), and one for the Case "示例：周报整理" (sample: weekly report) waiting for your input (Needs input), each with a source icon, status, body summary and time; the bell at the top of the sidebar on the left shows 9](/screenshots/en/p20-通知-9533d5.webp)

<figcaption>Notifications: the blue dot and the number 9 next to the page title Notifications are the unread count, with Mark all read at the top right; the filters All / Unread and All sources / Cron / Case; the list contains notifications for the cron job "周报摘要" (weekly report summary), one completed (Completed) and one failed (Failed), and one for the Case "示例：周报整理" (sample: weekly report) waiting for your input (Needs input), each with a source icon, status, body summary and time; the bell at the top of the sidebar on the left shows 9</figcaption>
</figure>

- Notifications receives two kinds of notifications: **cron jobs** (run completed or failed) and **Cases** (needs input, awaiting action, completed, failed);
- Two sets of filters at the top: **All / Unread** and **All sources / Cron / Case**;
- A black dot in front of an item means it is unread; after the title, a "colored dot + text" shows the status, such as Completed, Failed or Needs input;
- **Click an item to expand its body in place** (rendered as Markdown) and mark it as read at the same time; **View source** in the expanded area jumps to the related session or Case detail page;
- **Mark all read** at the top right clears all unread items at once.

Notifications follows the current space. Cron jobs and Cases in hidden spaces still deliver here as usual.

## Notification channels \{#notification-channels}

Open **Settings → Notification channels** (in the **Integrations** group of the settings navigation):

<figure>

![Settings → Notification channels: the description explains that the built-in Notifications channel is always on and that a webhook channel POSTs a JSON message to the URL you enter; "Notifications (built-in)" is marked Enabled, described as "In-app notification ledger, always on, zero config", with "No external channels configured yet." below it; the New Webhook channel button; and the expandable "Webhook payload format"](/screenshots/en/815-设置-通知渠道-9533d5.webp)

<figcaption>Settings → Notification channels: the description explains that the built-in Notifications channel is always on and that a webhook channel POSTs a JSON message to the URL you enter; "Notifications (built-in)" is marked Enabled, described as "In-app notification ledger, always on, zero config", with "No external channels configured yet." below it; the New Webhook channel button; and the expandable "Webhook payload format"</figcaption>
</figure>

| Channel                      | Description                                                                                                                                                                                                           |
| ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Notifications (built-in)** | In-app notifications. Always on, needs no setup, cannot be deleted                                                                                                                                                    |
| **Webhook**                  | When a notification fires, sends a `POST` request to the URL you enter, with a JSON body; custom headers can be added. Use it to connect your company's own systems, or to push to group bots through a relay service |

### New Webhook channel

1. Click **New Webhook channel**.
2. Fill in the **Name** (for example "Ops team hook") and the **Webhook URL** (for example `https://example.com/hooks/heys`).
3. If the other side requires authentication, click **Add header** and fill in the header name and value, for example `Authorization` and `Bearer …`.
4. Click **Test connection**, and HeyS sends a test payload (with `"test": true`). If the other side returns HTTP 2xx you see "Connection OK"; otherwise "Test failed: …".
5. Click **Save**. From then on you can tick it under a cron job's **Custom** notifications or a Case template's **Notification channels**.

You can edit, disable or delete a channel at any time. After it is deleted, cron jobs and Cases that still reference it fail to deliver from then on, and a record is kept.

:::tip Tip
Tick **Notifications** as well in every notification policy: if something goes wrong on the webhook side, there is still a copy in HeyS.
:::

### Webhook payload format

Expand **Webhook payload format** at the bottom of the page for the full description. The key points:

| Item    | Value                                      |
| ------- | ------------------------------------------ |
| Method  | `POST`, `Content-Type: application/json`   |
| Timeout | 10 seconds                                 |
| Success | HTTP 2xx (the response body is not parsed) |
| Retries | 1 min / 5 min / 30 min, 3 attempts         |

Sample payload:

```json
{
  "version": 1,
  "notificationId": "…",
  "source": { "type": "cron", "id": "<cron job id>", "eventId": "<run id>" },
  "kind": "completed",
  "title": "Scheduled job \"Daily news\" completed",
  "body": "## Top stories today\n1. …",
  "deepLink": "/sessions/<session id>",
  "createdAt": "2026-11-19T01:00:00.000Z"
}
```

| Field            | Meaning                                                                                                                                                                |
| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `version`        | Payload version, currently 1. Later versions only add fields; they never change the meaning of existing ones                                                           |
| `notificationId` | Unique notification ID. It stays the same when the same notification is redelivered, so you can use it to deduplicate                                                  |
| `source`         | The origin: `type` is `cron` (cron job) or `case` (Case); `id` is the ID of the cron job or Case; `eventId` is the ID of the event that triggered it this time         |
| `kind`           | `completed`, `failed`, `needs_user` (needs input), `waiting_transition` (awaiting action)                                                                              |
| `title`          | The headline                                                                                                                                                           |
| `body`           | The body: the task's full final answer (Markdown, capped at 4000 characters, truncated beyond that). Charts in the answer are replaced with equivalent Markdown tables |
| `deepLink`       | A relative path in HeyS; prefix it with your HeyS address to open the source page                                                                                      |
| `createdAt`      | When the notification was created (ISO 8601, UTC)                                                                                                                      |
| `test`           | Present, and `true`, only in the test payload sent by **Test connection**                                                                                              |

:::note Note
The body is Markdown and can be long. To reach group bots such as Feishu or DingTalk, you usually need a relay service that converts it into the message format they expect. A webhook can point to an intranet address; that is the main way to connect internal company systems. Only administrators can configure channels.
:::

## System notifications and the Dock badge \{#system-notifications-and-the-dock-badge}

Besides Notifications, HeyS also lets you know when a task you started finishes. Under **Settings → General → Task notifications** there are three switches:

| Switch                                  | What it does                                                                          |
| --------------------------------------- | ------------------------------------------------------------------------------------- |
| **Enable notifications**                | Alerts you when a task finishes, fails, or stops to wait for you                      |
| **Only when the window is not focused** | Stays quiet while you are looking at HeyS                                             |
| **Notify on failure too**               | When off, you are only alerted when a task completes successfully or needs your reply |

Below the switches, HeyS tells you which kind of alert it is currently using:

- **Desktop app**: system notifications; clicking one takes you straight back to that session. New items arriving in Notifications also pop up (three or more at once are merged into one, "N new notifications"), and clicking opens Notifications; new emails arriving in your mail accounts also follow these switches ([Mail](https://docs.heys.ai/workstation/en/mail.md));
- **Web app**: browser notifications. A permission prompt appears the first time, and you need to allow it; if it is denied, in-app alerts are used instead;
- **When neither is available**: an alert pops up inside the app, and the unread count is shown in the tab title.

In the desktop app, the number on the badge of the Dock (macOS) or taskbar (Windows) icon is the sum of two parts:

- **Sessions**: the number of sessions that finished in the background and are waiting for you to look at them. It resets when you return to the HeyS window;
- **Notifications**: the unread count of Notifications. It only goes down once you have read items there.

So a new notification adds only 1 to the badge; it is not counted twice.

:::note Note
**Live updates** under **Settings → General → Experimental** is on by default: when something changes in Notifications, the sidebar and similar places, the server notifies the app directly, so new notifications appear sooner. If the connection has problems, it falls back to refreshing on a timer.
:::

## FAQ \{#faq}

**A cron job did not run on time.** Check whether it is **On** in the list; a one-time job disables itself after running once; check whether HeyS was running on the desktop when the time came. You can click **Run Now** first to see whether it runs normally.

**Last Run shows Skipped.** Cloud sync is on, and this cron job runs on another computer. Hover to see why; to run it on this computer, click **Run on this computer** in the details.

**Notifications shows a failed run.** Expand the notification and click **View source**, then look at the run to find the reason for the failure (model service, network, file paths and so on).

**The cron job cannot find the files in my project.** No **Project** was chosen when it was created, so the task runs in its own folder. Edit it and choose the **Project**.

**My webhook receives no notifications.** First run **Test connection** on the channel; then make sure the cron job's notifications are **Custom** with this channel and the right events ticked (recurring jobs by default only notify on failure, and only to Notifications).

**I want to hear about successful daily runs too.** Change the notifications to **Custom** and tick **Run completed**.
