|
| 1 | +--- |
| 2 | +title: Scheduled Tasks |
| 3 | +description: Save a natural-language agent prompt and have Cube run it automatically on a schedule, producing an Analytics Chat thread for each run. |
| 4 | +--- |
| 5 | + |
| 6 | +<Warning> |
| 7 | + |
| 8 | +Scheduled Tasks are currently in preview, and the user experience may still |
| 9 | +change. Reach out to the [Cube support team](/admin/account-billing/support) |
| 10 | +to activate this feature for your account. |
| 11 | + |
| 12 | +</Warning> |
| 13 | + |
| 14 | +Scheduled Tasks let you save a natural-language prompt for the |
| 15 | +[agent](/docs/explore-analyze/analytics-chat) and have Cube run it |
| 16 | +automatically on a schedule — or on demand. Each run produces an |
| 17 | +[Analytics Chat](/docs/explore-analyze/analytics-chat) thread you can open |
| 18 | +later to read the agent's answer. |
| 19 | + |
| 20 | +For example, you might schedule a task to *"every weekday at 9am, summarize |
| 21 | +yesterday's signups and flag anything anomalous"* and review the resulting |
| 22 | +chat each morning. |
| 23 | + |
| 24 | +Scheduled Tasks are **scoped to a deployment** — each task belongs to the |
| 25 | +deployment it was created in. |
| 26 | + |
| 27 | +## Where to find it |
| 28 | + |
| 29 | +In the deployment sidebar, open **Scheduled** (the clock icon, below |
| 30 | +**Explore**). The page lists the deployment's tasks with their name, |
| 31 | +schedule, status, and description, and is searchable. |
| 32 | + |
| 33 | +{/* TODO: screenshot — Scheduled Tasks list page in the deployment sidebar */} |
| 34 | + |
| 35 | +## Anatomy of a task |
| 36 | + |
| 37 | +A task has: |
| 38 | + |
| 39 | +- **Name** (required) — how the task appears in the list. |
| 40 | +- **Description** (optional) — a short summary shown in the list. |
| 41 | +- **Instructions** (required) — the natural-language prompt the agent runs on |
| 42 | + each execution. |
| 43 | +- **Schedule** — how often the task runs (see below). |
| 44 | +- **Enabled** — a toggle to activate or pause a scheduled task. |
| 45 | + |
| 46 | +## Schedule options |
| 47 | + |
| 48 | +Scheduled Tasks use the same schedule editor as |
| 49 | +[dashboard scheduled refresh](/docs/explore-analyze/scheduled-refreshes), |
| 50 | +offering these frequencies: |
| 51 | + |
| 52 | +- **Manual** — no schedule; the task runs only when you trigger it with |
| 53 | + **Run now**. |
| 54 | +- **Hourly**, **Daily**, **Weekly** (with a day of the week), and **Monthly** |
| 55 | + (with a day of the month) — each with a time picker. |
| 56 | +- **Custom** — a raw cron expression for full control. |
| 57 | + |
| 58 | +A **timezone** selector (defaulting to your browser's timezone) controls when |
| 59 | +the schedule fires; it is stored per task. |
| 60 | + |
| 61 | +## Managing tasks |
| 62 | + |
| 63 | +From the list, you can: |
| 64 | + |
| 65 | +- **Create** a new task. |
| 66 | +- **Edit** an existing task's instructions, schedule, or details. |
| 67 | +- **Enable / Pause** a scheduled task to control whether it runs on schedule. |
| 68 | +- **Run now** — trigger a one-off run immediately. This works for both manual |
| 69 | + and scheduled tasks. |
| 70 | +- **Delete** a task. Deleting removes its schedule and stops all future runs. |
| 71 | + |
| 72 | +## Reading the output |
| 73 | + |
| 74 | +Each run creates an [Analytics Chat](/docs/explore-analyze/analytics-chat) |
| 75 | +thread containing the agent's response. Open the thread from the chat UI to |
| 76 | +read the full answer, ask follow-up questions, or |
| 77 | +[save results to a Workbook](/docs/explore-analyze/workbooks). |
| 78 | + |
| 79 | +The task runs headlessly under the security context of the user who created |
| 80 | +it, so it sees exactly the data that user can access. |
| 81 | + |
| 82 | +## Managing tasks from chat |
| 83 | + |
| 84 | +You can also create and manage Scheduled Tasks conversationally in |
| 85 | +[Analytics Chat](/docs/explore-analyze/analytics-chat). Ask the agent to |
| 86 | +schedule, update, list, or delete tasks in plain language — for example, |
| 87 | +*"schedule a daily summary of yesterday's signups at 9am"* or *"list my |
| 88 | +scheduled tasks."* |
| 89 | + |
| 90 | +## Preview limitations |
| 91 | + |
| 92 | +- Scheduled Tasks must be activated for your account by the |
| 93 | + [Cube support team](/admin/account-billing/support). |
| 94 | +- Results are delivered only as Analytics Chat threads — there is no email or |
| 95 | + Slack delivery. |
| 96 | +- Missed runs (for example, while a deployment is unavailable) are not caught |
| 97 | + up automatically. |
| 98 | +- There is no in-app run-history view yet. |
0 commit comments