Save a natural-language agent prompt and have Cube run it automatically on a schedule, producing a chat thread for each run.
Scheduled Tasks let you run tasks on a schedule — or whenever you need them.
Save a natural-language prompt for the
agent and have Cube run it
automatically on a schedule or on demand. Each run produces a chat thread
you can open later to read the agent’s answer. You can also ask the agent to create a
scheduled task for you from any of your chats.For example, you might schedule a task to “every weekday at 9am, summarize
yesterday’s signups, flag anything anomalous, and email me the results” and
review the summary each morning.Scheduled Tasks are scoped to a deployment — each task belongs to the
deployment it was created in.
In the deployment sidebar, open Scheduled (the clock icon, below
Explore). The Scheduled tasks tab of the
Scheduled tasks and refreshes page lists the deployment’s tasks, and is
searchable. Each row shows:
Enable/disable toggle — the untitled first column; pauses or resumes the
task (see Managing tasks).
Name and Description. A click on a row opens the task’s
detail page.
Schedule — when the task runs, followed by its timezone, for example
“Daily at 9:00 AM UTC” or “Weekly on Monday at 9:00 AM America/New_York”, or
“Manual”.
Condition — the task’s condition in plain
language, or “Every run” when it has none.
Next run — how long until the next run, counted from your clock and
given in its largest unit, for example “in 25 minutes”, “in 7 hours”, or “in
15 days”, as on the
Scheduled refreshes
cards; a run whose time has passed reads “due now” or, for example, “due 3
hours ago”. Hovering it shows the line with the date and time of the run
under it, in your timezone and naming it. It reads “Paused” for a paused
task, “Manual” for a manual one, and “Not scheduled” for an enabled task
that has no next run.
Notifications — where the task’s notifications go (see
Notifying people when a run finishes):
its channels, how many people and groups, and its Slack channels, for
example “Inbox, Email · 3 people, 1 group · #sales, #finance-alerts”, or
“Nobody is notified”.
Last check — on a conditional task, the outcome of its last check, for
example “3 minutes ago, Count increased by 2.7%, notified”, or “Not checked
yet” before the first one; ”—” on a task with no condition. Only the task’s
creator sees what the check read; anyone else sees, for example, “3 minutes
ago, notified”. Hovering it shows the whole line and the date and time of
the check, and the task’s detail page tells the whole
check.
Click the Name, Description, or Schedule column header to sort the
list. The Schedule column sorts by frequency and time, as on the
Scheduled refreshes
tab, with manual tasks last.The Scheduled refreshes tab lists the deployment’s
dashboard scheduled refreshes;
if you can use only one of the two, the page shows it without tabs.
A task has these settings, all edited in the Settings panel of its
detail page:
Name (required) — how the task appears in the list.
Description (optional) — a short summary shown in the list.
Instructions (required) — the natural-language prompt the agent runs on
each execution.
Agent (optional) — the agent that runs the task. Deployment default
follows the deployment’s
default agent at run time; a
task created from chat keeps that chat’s agent unless you ask the agent for
another.
Schedule — how often the task runs (see below).
Enabled — a toggle to activate or pause a scheduled task.
Notify — the people and groups to notify when a run finishes, and how:
Inbox, Email, and Slack channels, in any combination (see
Notifying people when a run finishes).
Notify only when a condition is met (optional) — a metric condition
that decides whether the agent runs at all (see
Conditional tasks).
On Deployment default, a task whose creator can’t use the default agent
falls back to Auto, or fails when Auto is turned off. A task whose picked agent is
deleted fails its runs until you pick another.
Manual — no schedule; the task runs only when you trigger it with
Run now (or, on a conditional task,
Check now).
Hourly, Daily, Weekly (with a day of the week), and Monthly
(with a day of the month) — each with a time picker.
Custom — a raw five-field cron expression. Its minute field must be a
single number, so it fires at most once an hour: 30 9 * * 1-5 (9:30 on
weekdays) works, while */15 * * * * is rejected.
A timezone selector (defaulting to your browser’s timezone) controls when
the schedule fires; it is stored per task, and the task’s schedule is shown
with it, for example “Daily at 9:00 AM UTC”.
Turn on Notify only when a condition is met in the task’s Settings to
hear from the agent only when a metric moves. Before the agent runs, Cube
reads one measure, with the creator’s data access, and checks the condition:
Measure — the metric to watch.
Time dimension and By (Day, Week, Month, Quarter, or Year) —
picking a measure fills in the first time dimension of its view, if it has
one. Clear it to watch the measure’s all-time total instead; By then
stays disabled.
Condition — one of:
changes by — the last complete period moved Up, Down, or
Up or down by at least the percentage you enter, compared with the
period before it.
goes above or below — the value is above, is below, or is
equal to the number you enter. With a time dimension, the value is the
last complete period’s; without one, the total.
is unusual — the last complete period is outside the range of the
periods before it (their median ± 3 × median absolute deviation). It needs
at least 8 complete periods before the last one.
changes by and is unusual compare periods, so they’re unavailable
without a time dimension. The period still in progress is never read: a
monthly condition checked in mid-September compares August with July.The task notifies once each time the condition starts to hold:
The agent runs the task’s Instructions in a new chat thread that opens
with the facts it found: the value read, what it was compared with, and the
periods. Ask follow-up questions in that thread as in any chat.
The task’s recipients are notified
on the channels the task has on. The creator’s message is titled with the
task’s name and “condition met” and states the change, for example
“Revenue rose 7.2 % (Aug → Sep 2026), above your 5 % threshold”. The
message names the measure by the title picked in the task’s Settings, or
by its full name (such as orders.revenue) on a task that has no title for
it. Everyone else, and each Slack channel, is told that the condition
started to hold, without the figures. The figures stay in the run’s chat
thread, which everyone the task is shared with can open (see
Managing tasks).
A task with a condition must notify someone: Inbox or Email on with at
least one person or group picked, or Slack on with at least one channel.
Until it does, Create (or, on an existing task, Update) in the task’s
Settings stays disabled and says why, and the agent refuses the save. The
Platform API refuses it too when the request sets the task’s notification
field; a request that leaves that field out is saved.While the condition keeps holding, later checks send nothing. Once a check
finds it no longer holding, the next time it holds notifies again. Changing
the condition’s measure, time dimension, period, or rule, or pausing the
task, starts over: the next check that finds the condition holding notifies.
Editing only the name, instructions, or schedule doesn’t.A check that finds the condition not holding, that can’t decide (for example,
the measure is no longer in the data model, the previous period was 0, so
there is no % change, or the task’s access to the data couldn’t be renewed, as
when its creator has been deactivated), or that can’t read the metric at all
(for example, the query fails) runs no agent, creates no thread, and sends
nothing. It doesn’t appear in History; the task’s
Last check shows what it read and why nothing was sent. A
check that can’t decide or can’t read the metric also leaves the condition’s
state as it was: on a task that has already notified, the next check that
finds the condition still holding sends nothing.Every scheduled run of a conditional task checks the condition. A Manual
task’s condition is checked only when you press Check now, which checks it
right away, exactly as a scheduled run would. Run now skips the check: it
always runs the agent and leaves the condition’s state as it was.
Each user can have up to 20 active tasks across all of the account’s
deployments, where active means scheduled and enabled. Manual and paused
tasks don’t count toward this limit. At the limit, anything that would make
a task active fails: creating a scheduled task, resuming a paused one, or
adding a schedule to a Manual task. Pause or delete another task first,
or keep the new one Manual.The Scheduled tasks tab lists one deployment’s tasks, so active tasks you
created in other deployments count toward the limit without appearing there.
Check the Scheduled page of each deployment you work in to find them.
A task is visible only to its creator, to admins, to roles granting View all
scheduled tasks or Manage all scheduled tasks on the deployment, and to
the people and groups it’s shared with. The creator, an admin, or a role granting Manage all scheduled tasks shares it with the Share
button on its detail page. Sharing is view-only: the people it’s shared with
see the task, its schedule, and its run history, and its detail page shows
a View only tag in place of its actions and its settings with no
Update button, none of them editable. Creating a task needs the
Create scheduled taskspermission,
which every built-in role grants. Users without it, for example those whose
only role is a custom role that leaves it out, get no Create scheduled task button, and
the agent and the Platform API refuse to create a task for them; tasks they
already created stay theirs to manage. Only a task’s creator, a user with
the Adminrole, or a
user whose role grants Manage all scheduled tasks on the deployment (see
custom roles)
can edit, pause, run, check, share, or delete it, because every run executes as
the creator (see Reading the output).That exception carries the creator’s data access with it: an admin or a
Manage all scheduled tasks holder who edits another user’s task changes what runs under that user’s access. A run’s chat
thread belongs to the task’s creator, and only the creator, admins, users with
the Access chat historypermission, people the thread
itself is shared with, and the people and groups the task is shared with can
open it. For anyone the task is shared with, the thread is view-only.From the list, you can:
Create a new task with Create scheduled task. It opens a Create scheduled task
page with empty settings. If you can use
Analytics Chat, the agent chat sits
beside them, and a message asking the agent to explain scheduled tasks and
interview you about what the task should do and when it should run is sent
for you. Answer the agent and it creates the task: the page becomes the new
task’s detail page, with the same chat still open. Or
fill in the settings yourself and press Create: the page becomes the new
task’s detail page beside a new, empty chat, and the set-up conversation
stays in the chat’s history.
Open a task by clicking its row, to change it on its
detail page.
Enable / Pause a scheduled task with the switch at the start of its row:
a paused task stops running on its schedule, and its Next run reads
“Paused”. A manual task’s switch is off and disabled, because a manual task
runs only when started by hand. While the change saves, the switch is
disabled; if it fails, an error message appears and the switch keeps its
previous state. A task shared with you has no switch.
Run now — trigger a one-off run immediately. This works for both manual
and scheduled tasks. Triggering a run shows a toast with a View
link straight to the run’s chat thread, and the thread appears in the
Recent chats sidebar immediately. On a
conditional task, Run now runs the agent without
checking the condition.
Check now — on a conditional task, check the condition right away. A
Check started toast appears, and the result shows on the task’s
detail page.
Delete a task. Deleting removes its schedule and stops all future runs.
Clicking a task in the list opens its detail page. The header shows a
breadcrumb back to Scheduled Tasks and the task name, along with Share,
Delete (trash), and a primary Run now button. A conditional task also
has a Check now button. On a narrow window, Share, Check now, and
Run now show only their icons; hover one to see its name. On a conditional
task, hovering Run now says instead that it runs the agent without
checking the condition.The page is in three parts, side by side: the task’s history on the left, its
Settings next to it, and, if you can use
Analytics Chat, the agent chat on the
right. On a narrow window, the history sits above the settings.The left part shows the task’s description and a status tag (Manual,
Active, or Paused), then:
Condition — on a conditional task only, above History: the
condition in plain language (for example, “When Count changes by ≥ 5 % vs
the previous month”), then, on a line of its own, when it is checked. On a
scheduled task, that line says each scheduled run checks the condition
first and runs the agent only when it holds; on a Manual task, that the
condition is checked only when Check now is pressed, by you or, on a
task you didn’t create, by its owner, an admin, or a role granting
Manage all scheduled tasks. Its Last check follows.
History — the task’s runs, newest first. Each entry is a timestamped
link that opens that run’s chat thread, if you can
access it. Currently-executing runs
show a Running tag, and failed runs a Failed tag. The list shows
the latest 50 runs; a “Showing the latest 50 runs” note appears once the
cap is hit.
The Last check shows when the last check ran, its result (Condition not
met, Condition met — notified, Still holding — already notified,
Could not check, or Check failed), the value it read with the
comparison it made, and, when nothing was sent, why. On a task that notifies
nobody when its condition holds, for example one created through the Platform
API without a notification field, the two results of a check that finds it
holding read
Condition met and Still holding. While a check runs, it reads
Checking…. After a check that finds the condition starting to hold, the
agent run it started appears in History on the same page. The check reads
the metric with the creator’s data access, so only the creator sees the values
it read and the error behind a Check failed. Anyone else who can open the
task, an admin included, sees when it ran, its result, and why nothing was
sent, for example “The metric could not be read. Nothing sent.”
The Settings panel holds every setting of the task,
each showing its saved value. Update stays disabled until you change one;
pressing it saves only the settings you changed and shows “Scheduled task
updated”. Name and Instructions are required, and a condition that
isn’t complete keeps Update disabled and shows why.
The chat beside the settings works on the task on screen: every message you
send carries it, shown as a chip with the task’s name in the bottom row of the
message box, beside the agent picker. A name too long for the chip is cut;
hover the chip to read it whole. In a chat dragged narrow, the chip shrinks to
its clock icon, which still shows the name on hover. Ask in plain language,
for example “run it every day at 8:00 instead” or “tell me only when
monthly orders change by 5% or more”, and the agent changes this task. The
Settings panel shows the change without a reload.Changes you haven’t saved in the panel stay as you typed them when the agent
changes the task, and Update stays enabled. Since Update saves only
the settings you changed, it doesn’t undo a change the agent made to another
setting.Hide chat and Show chat in the header hide and show the chat; on a
narrow window, Show chat opens it over the page.
Each run creates a chat thread containing the agent’s response. Open the
thread in Analytics Chat to read the
full answer, ask follow-up questions, or
save results to a Workbook.
Scheduled-run threads are marked in the Recent chats sidebar with a clock
icon (hover over it to see the “Scheduled task” tooltip).A run shows as Running while it executes, then completes or fails. A
failed run’s thread shows a failure notice instead of an empty thread.A run’s thread carries no memory of earlier runs, so write the
Instructions as a complete request rather than a follow-up to the last
run.The task runs headlessly under the security context of the user who created
it, so it sees exactly the data that user can access.
The Notify section of the task’s Settings decides who hears about a
finished run, and how:
People and groups — any workspace users and user groups, picked from
the same search as the Share dialog. A group is expanded to its members
when the run finishes, so people who join it later are notified too. A
person picked directly and through a group is notified once.
Send by — Inbox (an inbox notification), Email,
and Slack, in any combination. Inbox and Email go to every
person and group picked above. With Slack on, pick one or more channels:
each gets one post. If Slack isn’t connected to the workspace, the
Settings panel offers to connect it. Inbox is unavailable when the
inbox is off for the workspace, and a task saved with it on then sends no
inbox notifications but still sends its other channels.
A new task starts with you picked and Inbox on, so it notifies you the way
it did before; you can remove yourself. With every channel off, nobody is
notified, and the panel says so.Each notification carries the task name, whether the run succeeded, the start
of the agent’s answer, and a link that opens the run. Each Slack post carries
the same answer and link. Saving a task with a newly picked person or group
shares the task with them, view-only, so the link opens the run for them,
whether they were picked in the task’s Settings, by the agent, or through
the Platform API. Removing them from Notify leaves the share in place;
remove it in the Share dialog. Besides the creator, a run notifies only
people who can open the task (admins, and anyone it’s shared with directly,
through a group, or with the whole organization) and read its deployment. A
picked person fails that in two ways: their share was removed in the Share
dialog after they were picked (saving the task again doesn’t share it back;
remove them from Notify and pick them again), or they can’t read the
deployment. The run skips them, and the Settings panel marks them Not
shared: won’t be notified in both cases. Deactivated users and people
outside the workspace get nothing.Notifications go to the task’s recipients, whoever runs the task: an admin or
a user with Manage all scheduled tasks who edits or runs it is notified
only if they are a recipient.Each task email has an unsubscribe link. Unsubscribing stops that person’s
emails from this task, scheduled runs included, until the task’s creator picks
them again directly.A failed run notifies only the task’s creator, if they are among the task’s
recipients, on the task’s Inbox and Email channels; other recipients
and Slack channels get nothing. Notifications apply to both scheduled runs and
Run now. On a conditional task, a check that runs no
agent sends nothing. See Inbox for what an
inbox notification shows.A task that you create with the agent or the Platform API notifies nobody,
unless you ask for it: for example, “every Monday summarize sales, email it
to the Finance group and anna@example.com, and post it in #sales.” The agent
names people by email and groups by name. Channels belong to the whole task,
as in the Settings panel: asking the agent to notify one more person by
inbox turns Inbox on for everyone the task notifies, and the agent tells
you so. With the Platform API, set the task’s notification field.
Beyond querying the semantic model, the agent in a scheduled run can:
Send email to workspace members — for example, “summarize yesterday’s
signups and email the summary to me.” This requires the agent email tool
to be enabled for the workspace; recipients are restricted to workspace
members.
Use web search.
Create and update reports, workbooks, and dashboards, using the task
creator’s permissions.
Work with the data model — for example, “review last week’s slow
queries and propose pre-aggregations for them.” The agent can read the
data model and query history, edit model files, and commit the changes to
its own dev branch. This requires the
task’s creator to have the Edit data model or Edit data model on dev
branchespermission.
Query data sources with SQL, if the task’s creator has the Access SQL
Runner permission.
A scheduled run never publishes changes. It can’t merge to the main
branch, switch your active branch, or build pre-aggregations. To apply its
changes, review the branch it committed to and merge it yourself.
You can also create and manage Scheduled Tasks conversationally in
Analytics Chat — from any chat, not
just the one beside a task on its detail page. Ask the
agent to schedule, update, list, or delete tasks in plain language — for
example, “schedule a daily summary of yesterday’s signups at 9am” or
“list my scheduled tasks.” When the agent opens a task in the chat’s side
panel, its pencil button opens the task’s detail page with that chat beside
it. When data alerts are turned on for
your account, an alert on a chart of a published dashboard is not a task: it
belongs to a scheduled refresh of that dashboard, and the agent doesn’t create
a task for it.The agent’s actions render in the chat as labeled steps with a clock icon —
“Creating scheduled task…” / “Created scheduled task”, “Listed
scheduled tasks”, “Updated scheduled task”, and “Deleted scheduled
task”.The agent manages task definitions: when listing tasks, it can report each
task’s id, name, description, schedule, timezone, enabled state, next run
time, who it notifies and how, agent, and condition with its last check
(the check’s values and error text only to the task’s creator). It can also
add, change, or remove a task’s condition — for
example, “tell me when monthly orders change by 5% or more” — and pick the
agent a task runs on, or set it back to Deployment default. On a
deployment with more than 50 agents, the agent sees only 50 of them and says
so; pick any other in the task’s Settings. A task’s run history lives on
its detail page. The agent follows the same
limits and permissions as the Scheduled page, and a scheduled
run can’t create or change tasks itself.
You can also create, update, pause, run, and delete Scheduled Tasks from
scripts and CI with the Platform API (by
default, only admins can
create API keys). Its
Scheduled Tasks endpoints follow the same limits and
permissions as the Scheduled page. A task’s
notification field holds its
recipients and channels: channels
(inbox, email, slack), userIds, groupIds, and slackChannels, with
at most 1,000 users, 200 groups, and 50 Slack channels. An unknown user or
group id is refused. The older notificationEnabled field is
deprecated: it reads whether the creator gets an inbox notification, and
writing it adds or removes that. A task’s optional
condition field holds its condition (null on an
update removes it), and lastConditionCheck holds its latest check, whose
values and error text are returned only to the task’s creator. See the
API reference for the
endpoints, fields, and responses.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Cube Documentation","colors":{"primary":"#5339CF","light":"#A5A3FF","dark":"#716EEE"},"logo":{"light":"https://mintcdn.com/cubed3/wCTntgEXVYYYnx4l/logo/light.svg?fit=max\u0026auto=format\u0026n=wCTntgEXVYYYnx4l\u0026q=85\u0026s=8bbf45ba64eac6116629064fac55aad7","dark":"https://mintcdn.com/cubed3/wCTntgEXVYYYnx4l/logo/dark.svg?fit=max\u0026auto=format\u0026n=wCTntgEXVYYYnx4l\u0026q=85\u0026s=d8fa230950c8c63b3c2f88d2768694d0"},"favicon":"https://mintcdn.com/cubed3/wCTntgEXVYYYnx4l/favicon.svg?fit=max\u0026auto=format\u0026n=wCTntgEXVYYYnx4l\u0026q=85\u0026s=3b0cb7aa770d2abd546ef19463fbba8c","navbar":{"links":[{"href":"https://cube.dev/demos","label":"Demos"},{"href":"https://cube.dev/changelog","label":"Changelog"},{"href":"https://slack.cube.dev","label":"Community"}],"primary":{"type":"button","label":"Get Started","href":"https://cubecloud.dev/auth/signup"}},"footer":{"socials":{"x":"https://x.com/the_cube_dev","github":"https://github.com/cube-js/cube","linkedin":"https://www.linkedin.com/company/cube-dev"}},"seo":{"metatags":{"og:type":"website","og:site_name":"Cube Documentation"},"indexing":"navigable"},"icons":{"library":"tabler"},"styling":{"codeblocks":"dark","latex":false},"integrations":{"gtm":{"tagId":"GTM-52W7VM2"}},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"cubed3","hasAudioNarration":false,"actualSubdomain":"cubed3","customDomains":["docs.cube.dev"],"gitSource":{"type":"github","owner":"cube-js","repo":"cube","deployBranch":"master","contentDirectory":"docs-mintlify","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ae88c4fd2f0a6b0237e02cd","collectionId":"86953882-3717-42a1-8f99-e3bc8af2656d","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae88c4fd2f0a6b0237e02cd"},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6ae89609de528214ed2024c1","clientVersion":"0.0.4044","searchFilterCounts":[{"language":"default","tag":"API","count":233},{"language":"default","tag":"Platform Endpoints","count":226},{"language":"default","tag":"Documentation","count":101},{"language":"default","tag":"Admin","count":94},{"language":"default","tag":"Data Modeling","count":65},{"language":"default","tag":"Recipes","count":47},{"language":"default","tag":"Topics","count":47},{"language":"default","tag":"Reference","count":44},{"language":"default","tag":"Connect to data","count":31},{"language":"default","tag":"Explore \u0026 Analyze","count":30}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"#content-area table,.mdx-content table{width:100%!important}"}],"page":{"pagePath":"docs/explore-analyze/scheduled-tasks","slug":"/docs/explore-analyze/scheduled-tasks","pageMetadata":{"title":"Scheduled Tasks","description":"Save a natural-language agent prompt and have Cube run it automatically on a schedule, producing a chat thread for each run.","href":"/docs/explore-analyze/scheduled-tasks"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Save a natural-language agent prompt and have Cube run it automatically on a schedule, producing a chat thread for each run.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,em:`em`,li:`li`,p:`p`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{Heading,Warning}=_components;if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Scheduled Tasks let you run tasks on a schedule — or whenever you need them.\nSave a natural-language prompt for the\n`,_jsx(_components.a,{href:`/docs/explore-analyze/analytics-chat`,children:`agent`}),` and have Cube run it\nautomatically on a schedule or on demand. Each run produces a chat thread\nyou can open later to read the agent’s answer. You can also ask the agent to create a\nscheduled task for you from any of your chats.`]}),`\n`,_jsxs(_components.p,{children:[`For example, you might schedule a task to `,_jsx(_components.em,{children:`“every weekday at 9am, summarize\nyesterday’s signups, flag anything anomalous, and email me the results”`}),` and\nreview the summary each morning.`]}),`\n`,_jsxs(_components.p,{children:[`Scheduled Tasks are `,_jsx(_components.strong,{children:`scoped to a deployment`}),` — each task belongs to the\ndeployment it was created in.`]}),`\n`,_jsx(Heading,{level:`2`,id:`where-to-find-it`,children:`Where to find it`}),`\n`,_jsxs(_components.p,{children:[`In the deployment sidebar, open `,_jsx(_components.strong,{children:`Scheduled`}),` (the clock icon, below\n`,_jsx(_components.strong,{children:`Explore`}),`). The `,_jsx(_components.strong,{children:`Scheduled tasks`}),` tab of the\n`,_jsx(_components.strong,{children:`Scheduled tasks and refreshes`}),` page lists the deployment’s tasks, and is\nsearchable. Each row shows:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Enable/disable toggle`}),` — the untitled first column; pauses or resumes the\ntask (see `,_jsx(_components.a,{href:`#managing-tasks`,children:`Managing tasks`}),`).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Name`}),` and `,_jsx(_components.strong,{children:`Description`}),`. A click on a row opens the task’s\n`,_jsx(_components.a,{href:`#task-detail-page`,children:`detail page`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Schedule`}),` — when the task runs, followed by its timezone, for example\n“Daily at 9:00 AM UTC” or “Weekly on Monday at 9:00 AM America/New_York”, or\n“Manual”.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Condition`}),` — the task’s `,_jsx(_components.a,{href:`#conditional-tasks`,children:`condition`}),` in plain\nlanguage, or “Every run” when it has none.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Next run`}),` — how long until the next run, counted from your clock and\ngiven in its largest unit, for example “in 25 minutes”, “in 7 hours”, or “in\n15 days”, as on the\n`,_jsx(_components.a,{href:`/docs/explore-analyze/scheduled-refreshes#managing-schedules`,children:`Scheduled refreshes`}),`\ncards; a run whose time has passed reads “due now” or, for example, “due 3\nhours ago”. Hovering it shows the line with the date and time of the run\nunder it, in your timezone and naming it. It reads “Paused” for a paused\ntask, “Manual” for a manual one, and “Not scheduled” for an enabled task\nthat has no next run.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Notifications`}),` — where the task’s notifications go (see\n`,_jsx(_components.a,{href:`#notifying-people-when-a-run-finishes`,children:`Notifying people when a run finishes`}),`):\nits channels, how many people and groups, and its Slack channels, for\nexample “Inbox, Email · 3 people, 1 group · #sales, #finance-alerts”, or\n“Nobody is notified”.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Last check`}),` — on a conditional task, the outcome of its last check, for\nexample “3 minutes ago, Count increased by 2.7%, notified”, or “Not checked\nyet” before the first one; ”—” on a task with no condition. Only the task’s\ncreator sees what the check read; anyone else sees, for example, “3 minutes\nago, notified”. Hovering it shows the whole line and the date and time of\nthe check, and the task’s `,_jsx(_components.a,{href:`#task-detail-page`,children:`detail page`}),` tells the whole\ncheck.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`Click the `,_jsx(_components.strong,{children:`Name`}),`, `,_jsx(_components.strong,{children:`Description`}),`, or `,_jsx(_components.strong,{children:`Schedule`}),` column header to sort the\nlist. The `,_jsx(_components.strong,{children:`Schedule`}),` column sorts by frequency and time, as on the\n`,_jsx(_components.a,{href:`/docs/explore-analyze/scheduled-refreshes#viewing-all-scheduled-refreshes`,children:`Scheduled refreshes`}),`\ntab, with manual tasks last.`]}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.strong,{children:`Scheduled refreshes`}),` tab lists the deployment’s\n`,_jsx(_components.a,{href:`/docs/explore-analyze/scheduled-refreshes#viewing-all-scheduled-refreshes`,children:`dashboard scheduled refreshes`}),`;\nif you can use only one of the two, the page shows it without tabs.`]}),`\n`,_jsx(Heading,{level:`2`,id:`anatomy-of-a-task`,children:`Anatomy of a task`}),`\n`,_jsxs(_components.p,{children:[`A task has these settings, all edited in the `,_jsx(_components.strong,{children:`Settings`}),` panel of its\n`,_jsx(_components.a,{href:`#task-detail-page`,children:`detail page`}),`:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Name`}),` (required) — how the task appears in the list.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Description`}),` (optional) — a short summary shown in the list.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Instructions`}),` (required) — the natural-language prompt the agent runs on\neach execution.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Agent`}),` (optional) — the agent that runs the task. `,_jsx(_components.strong,{children:`Deployment default`}),`\nfollows the deployment’s\n`,_jsx(_components.a,{href:`/admin/ai/multi-agent#default-agent-and-auto`,children:`default agent`}),` at run time; a\ntask created from chat keeps that chat’s agent unless you ask the agent for\nanother.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Schedule`}),` — how often the task runs (see below).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Enabled`}),` — a toggle to activate or pause a scheduled task.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Notify`}),` — the people and groups to notify when a run finishes, and how:\n`,_jsx(_components.strong,{children:`Inbox`}),`, `,_jsx(_components.strong,{children:`Email`}),`, and `,_jsx(_components.strong,{children:`Slack`}),` channels, in any combination (see\n`,_jsx(_components.a,{href:`#notifying-people-when-a-run-finishes`,children:`Notifying people when a run finishes`}),`).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Notify only when a condition is met`}),` (optional) — a metric condition\nthat decides whether the agent runs at all (see\n`,_jsx(_components.a,{href:`#conditional-tasks`,children:`Conditional tasks`}),`).`]}),`\n`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`On `,_jsx(_components.strong,{children:`Deployment default`}),`, a task whose creator can’t use the default agent\nfalls back to Auto, or fails when Auto is turned off. A task whose picked agent is\ndeleted fails its runs until you pick another.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`schedule-options`,children:`Schedule options`}),`\n`,_jsxs(_components.p,{children:[`Scheduled Tasks use the same schedule editor as\n`,_jsx(_components.a,{href:`/docs/explore-analyze/scheduled-refreshes`,children:`dashboard scheduled refresh`}),`,\noffering these frequencies:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Manual`}),` — no schedule; the task runs only when you trigger it with\n`,_jsx(_components.strong,{children:`Run now`}),` (or, on a `,_jsx(_components.a,{href:`#conditional-tasks`,children:`conditional task`}),`,\n`,_jsx(_components.strong,{children:`Check now`}),`).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Hourly`}),`, `,_jsx(_components.strong,{children:`Daily`}),`, `,_jsx(_components.strong,{children:`Weekly`}),` (with a day of the week), and `,_jsx(_components.strong,{children:`Monthly`}),`\n(with a day of the month) — each with a time picker.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Custom`}),` — a raw five-field cron expression. Its minute field must be a\nsingle number, so it fires at most once an hour: `,_jsx(_components.code,{children:`30 9 * * 1-5`}),` (9:30 on\nweekdays) works, while `,_jsx(_components.code,{children:`*/15 * * * *`}),` is rejected.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`A `,_jsx(_components.strong,{children:`timezone`}),` selector (defaulting to your browser’s timezone) controls when\nthe schedule fires; it is stored per task, and the task’s schedule is shown\nwith it, for example “Daily at 9:00 AM UTC”.`]}),`\n`,_jsx(Heading,{level:`2`,id:`conditional-tasks`,children:`Conditional tasks`}),`\n`,_jsxs(_components.p,{children:[`Turn on `,_jsx(_components.strong,{children:`Notify only when a condition is met`}),` in the task’s `,_jsx(_components.strong,{children:`Settings`}),` to\nhear from the agent only when a metric moves. Before the agent runs, Cube\nreads one measure, with the creator’s data access, and checks the condition:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Measure`}),` — the metric to watch.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Time dimension`}),` and `,_jsx(_components.strong,{children:`By`}),` (Day, Week, Month, Quarter, or Year) —\npicking a measure fills in the first time dimension of its view, if it has\none. Clear it to watch the measure’s all-time total instead; `,_jsx(_components.strong,{children:`By`}),` then\nstays disabled.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Condition`}),` — one of:`,`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`changes by`}),` — the last complete period moved `,_jsx(_components.strong,{children:`Up`}),`, `,_jsx(_components.strong,{children:`Down`}),`, or\n`,_jsx(_components.strong,{children:`Up or down`}),` by at least the percentage you enter, compared with the\nperiod before it.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`goes above or below`}),` — the value `,_jsx(_components.strong,{children:`is above`}),`, `,_jsx(_components.strong,{children:`is below`}),`, or `,_jsx(_components.strong,{children:`is\nequal to`}),` the number you enter. With a time dimension, the value is the\nlast complete period’s; without one, the total.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`is unusual`}),` — the last complete period is outside the range of the\nperiods before it (their median ± 3 × median absolute deviation). It needs\nat least 8 complete periods before the last one.`]}),`\n`]}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`changes by`}),` and `,_jsx(_components.strong,{children:`is unusual`}),` compare periods, so they’re unavailable\nwithout a time dimension. The period still in progress is never read: a\nmonthly condition checked in mid-September compares August with July.`]}),`\n`,_jsx(_components.p,{children:`The task notifies once each time the condition starts to hold:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`The agent runs the task’s `,_jsx(_components.strong,{children:`Instructions`}),` in a new chat thread that opens\nwith the facts it found: the value read, what it was compared with, and the\nperiods. Ask follow-up questions in that thread as in any chat.`]}),`\n`,_jsxs(_components.li,{children:[`The task’s `,_jsx(_components.a,{href:`#notifying-people-when-a-run-finishes`,children:`recipients`}),` are notified\non the channels the task has on. The creator’s message is titled with the\ntask’s name and `,_jsx(_components.em,{children:`“condition met”`}),` and states the change, for example\n`,_jsx(_components.em,{children:`“Revenue rose 7.2 % (Aug → Sep 2026), above your 5 % threshold”`}),`. The\nmessage names the measure by the title picked in the task’s `,_jsx(_components.strong,{children:`Settings`}),`, or\nby its full name (such as `,_jsx(_components.code,{children:`orders.revenue`}),`) on a task that has no title for\nit. Everyone else, and each Slack channel, is told that the condition\nstarted to hold, without the figures. The figures stay in the run’s chat\nthread, which everyone the task is shared with can open (see\n`,_jsx(_components.a,{href:`#managing-tasks`,children:`Managing tasks`}),`).`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`A task with a condition must notify someone: `,_jsx(_components.strong,{children:`Inbox`}),` or `,_jsx(_components.strong,{children:`Email`}),` on with at\nleast one person or group picked, or `,_jsx(_components.strong,{children:`Slack`}),` on with at least one channel.\nUntil it does, `,_jsx(_components.strong,{children:`Create`}),` (or, on an existing task, `,_jsx(_components.strong,{children:`Update`}),`) in the task’s\n`,_jsx(_components.strong,{children:`Settings`}),` stays disabled and says why, and the agent refuses the save. The\nPlatform API refuses it too when the request sets the task’s `,_jsx(_components.code,{children:`notification`}),`\nfield; a request that leaves that field out is saved.`]}),`\n`,_jsx(_components.p,{children:`While the condition keeps holding, later checks send nothing. Once a check\nfinds it no longer holding, the next time it holds notifies again. Changing\nthe condition’s measure, time dimension, period, or rule, or pausing the\ntask, starts over: the next check that finds the condition holding notifies.\nEditing only the name, instructions, or schedule doesn’t.`}),`\n`,_jsxs(_components.p,{children:[`A check that finds the condition not holding, that can’t decide (for example,\nthe measure is no longer in the data model, the previous period was 0, so\nthere is no % change, or the task’s access to the data couldn’t be renewed, as\nwhen its creator has been deactivated), or that can’t read the metric at all\n(for example, the query fails) runs no agent, creates no thread, and sends\nnothing. It doesn’t appear in `,_jsx(_components.strong,{children:`History`}),`; the task’s\n`,_jsx(_components.a,{href:`#task-detail-page`,children:`Last check`}),` shows what it read and why nothing was sent. A\ncheck that can’t decide or can’t read the metric also leaves the condition’s\nstate as it was: on a task that has already notified, the next check that\nfinds the condition still holding sends nothing.`]}),`\n`,_jsxs(_components.p,{children:[`Every scheduled run of a conditional task checks the condition. A `,_jsx(_components.strong,{children:`Manual`}),`\ntask’s condition is checked only when you press `,_jsx(_components.strong,{children:`Check now`}),`, which checks it\nright away, exactly as a scheduled run would. `,_jsx(_components.strong,{children:`Run now`}),` skips the check: it\nalways runs the agent and leaves the condition’s state as it was.`]}),`\n`,_jsx(Heading,{level:`2`,id:`limits`,children:`Limits`}),`\n`,_jsxs(_components.p,{children:[`Each user can have up to `,_jsx(_components.strong,{children:`20 active tasks`}),` across all of the account’s\ndeployments, where active means scheduled and enabled. Manual and paused\ntasks don’t count toward this limit. At the limit, anything that would make\na task active fails: creating a scheduled task, resuming a paused one, or\nadding a schedule to a `,_jsx(_components.strong,{children:`Manual`}),` task. Pause or delete another task first,\nor keep the new one `,_jsx(_components.strong,{children:`Manual`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.strong,{children:`Scheduled tasks`}),` tab lists one deployment’s tasks, so active tasks you\ncreated in other deployments count toward the limit without appearing there.\nCheck the `,_jsx(_components.strong,{children:`Scheduled`}),` page of each deployment you work in to find them.`]}),`\n`,_jsx(Heading,{level:`2`,id:`managing-tasks`,children:`Managing tasks`}),`\n`,_jsxs(_components.p,{children:[`A task is visible only to its creator, to admins, to roles granting `,_jsx(_components.strong,{children:`View all\nscheduled tasks`}),` or `,_jsx(_components.strong,{children:`Manage all scheduled tasks`}),` on the deployment, and to\nthe people and groups it’s shared with. The creator, an admin, or a role granting `,_jsx(_components.strong,{children:`Manage all scheduled tasks`}),` shares it with the `,_jsx(_components.strong,{children:`Share`}),`\nbutton on its detail page. Sharing is view-only: the people it’s shared with\nsee the task, its schedule, and its run history, and its detail page shows\na `,_jsx(_components.strong,{children:`View only`}),` tag in place of its actions and its settings with no\n`,_jsx(_components.strong,{children:`Update`}),` button, none of them editable. Creating a task needs the\n`,_jsx(_components.strong,{children:`Create scheduled tasks`}),`\n`,_jsx(_components.a,{href:`/admin/users-and-permissions/custom-roles#deployment-permissions`,children:`permission`}),`,\nwhich every built-in role grants. Users without it, for example those whose\nonly role is a custom role that leaves it out, get no `,_jsx(_components.strong,{children:`Create scheduled task`}),` button, and\nthe agent and the Platform API refuse to create a task for them; tasks they\nalready created stay theirs to manage. Only a task’s creator, a user with\nthe `,_jsx(_components.strong,{children:`Admin`}),` `,_jsx(_components.a,{href:`/admin/users-and-permissions/roles-and-permissions`,children:`role`}),`, or a\nuser whose role grants `,_jsx(_components.strong,{children:`Manage all scheduled tasks`}),` on the deployment (see\n`,_jsx(_components.a,{href:`/admin/users-and-permissions/custom-roles#deployment-permissions`,children:`custom roles`}),`)\ncan edit, pause, run, check, share, or delete it, because every run executes as\nthe creator (see `,_jsx(_components.a,{href:`#reading-the-output`,children:`Reading the output`}),`).`]}),`\n`,_jsxs(_components.p,{children:[`That exception carries the creator’s data access with it: an admin or a\n`,_jsx(_components.strong,{children:`Manage all scheduled tasks`}),` holder who edits another user’s task changes what runs under that user’s access. A run’s chat\nthread belongs to the task’s creator, and only the creator, admins, users with\nthe `,_jsx(_components.strong,{children:`Access chat history`}),`\n`,_jsx(_components.a,{href:`/admin/users-and-permissions/custom-roles`,children:`permission`}),`, people the thread\nitself is shared with, and the people and groups the task is shared with can\nopen it. For anyone the task is shared with, the thread is view-only.`]}),`\n`,_jsx(_components.p,{children:`From the list, you can:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Create`}),` a new task with `,_jsx(_components.strong,{children:`Create scheduled task`}),`. It opens a `,_jsx(_components.strong,{children:`Create scheduled task`}),`\npage with empty settings. If you can use\n`,_jsx(_components.a,{href:`/docs/explore-analyze/analytics-chat`,children:`Analytics Chat`}),`, the agent chat sits\nbeside them, and a message asking the agent to explain scheduled tasks and\ninterview you about what the task should do and when it should run is sent\nfor you. Answer the agent and it creates the task: the page becomes the new\ntask’s `,_jsx(_components.a,{href:`#task-detail-page`,children:`detail page`}),`, with the same chat still open. Or\nfill in the settings yourself and press `,_jsx(_components.strong,{children:`Create`}),`: the page becomes the new\ntask’s detail page beside a new, empty chat, and the set-up conversation\nstays in the chat’s history.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Open`}),` a task by clicking its row, to change it on its\n`,_jsx(_components.a,{href:`#task-detail-page`,children:`detail page`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Enable / Pause`}),` a scheduled task with the switch at the start of its row:\na paused task stops running on its schedule, and its `,_jsx(_components.strong,{children:`Next run`}),` reads\n“Paused”. A manual task’s switch is off and disabled, because a manual task\nruns only when started by hand. While the change saves, the switch is\ndisabled; if it fails, an error message appears and the switch keeps its\nprevious state. A task shared with you has no switch.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Run now`}),` — trigger a one-off run immediately. This works for both manual\nand scheduled tasks. Triggering a run shows a toast with a `,_jsx(_components.strong,{children:`View`}),`\nlink straight to the run’s chat thread, and the thread appears in the\nRecent chats sidebar immediately. On a\n`,_jsx(_components.a,{href:`#conditional-tasks`,children:`conditional task`}),`, `,_jsx(_components.strong,{children:`Run now`}),` runs the agent without\nchecking the condition.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Check now`}),` — on a conditional task, check the condition right away. A\n`,_jsx(_components.strong,{children:`Check started`}),` toast appears, and the result shows on the task’s\ndetail page.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Delete`}),` a task. Deleting removes its schedule and stops all future runs.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`task-detail-page`,children:`Task detail page`}),`\n`,_jsxs(_components.p,{children:[`Clicking a task in the list opens its detail page. The header shows a\nbreadcrumb back to Scheduled Tasks and the task name, along with `,_jsx(_components.strong,{children:`Share`}),`,\n`,_jsx(_components.strong,{children:`Delete`}),` (trash), and a primary `,_jsx(_components.strong,{children:`Run now`}),` button. A conditional task also\nhas a `,_jsx(_components.strong,{children:`Check now`}),` button. On a narrow window, `,_jsx(_components.strong,{children:`Share`}),`, `,_jsx(_components.strong,{children:`Check now`}),`, and\n`,_jsx(_components.strong,{children:`Run now`}),` show only their icons; hover one to see its name. On a conditional\ntask, hovering `,_jsx(_components.strong,{children:`Run now`}),` says instead that it runs the agent without\nchecking the condition.`]}),`\n`,_jsxs(_components.p,{children:[`The page is in three parts, side by side: the task’s history on the left, its\n`,_jsx(_components.strong,{children:`Settings`}),` next to it, and, if you can use\n`,_jsx(_components.a,{href:`/docs/explore-analyze/analytics-chat`,children:`Analytics Chat`}),`, the agent chat on the\nright. On a narrow window, the history sits above the settings.`]}),`\n`,_jsxs(_components.p,{children:[`The left part shows the task’s description and a status tag (`,_jsx(_components.strong,{children:`Manual`}),`,\n`,_jsx(_components.strong,{children:`Active`}),`, or `,_jsx(_components.strong,{children:`Paused`}),`), then:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Condition`}),` — on a conditional task only, above `,_jsx(_components.strong,{children:`History`}),`: the\ncondition in plain language (for example, `,_jsx(_components.em,{children:`“When Count changes by ≥ 5 % vs\nthe previous month”`}),`), then, on a line of its own, when it is checked. On a\nscheduled task, that line says each scheduled run checks the condition\nfirst and runs the agent only when it holds; on a `,_jsx(_components.strong,{children:`Manual`}),` task, that the\ncondition is checked only when `,_jsx(_components.strong,{children:`Check now`}),` is pressed, by you or, on a\ntask you didn’t create, by its owner, an admin, or a role granting\n`,_jsx(_components.strong,{children:`Manage all scheduled tasks`}),`. Its `,_jsx(_components.strong,{children:`Last check`}),` follows.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`History`}),` — the task’s runs, newest first. Each entry is a timestamped\nlink that opens that run’s chat thread, if you can\n`,_jsx(_components.a,{href:`#managing-tasks`,children:`access it`}),`. Currently-executing runs\nshow a `,_jsx(_components.strong,{children:`Running`}),` tag, and failed runs a `,_jsx(_components.strong,{children:`Failed`}),` tag. The list shows\nthe latest 50 runs; a “Showing the latest 50 runs” note appears once the\ncap is hit.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.strong,{children:`Last check`}),` shows when the last check ran, its result (`,_jsx(_components.strong,{children:`Condition not\nmet`}),`, `,_jsx(_components.strong,{children:`Condition met — notified`}),`, `,_jsx(_components.strong,{children:`Still holding — already notified`}),`,\n`,_jsx(_components.strong,{children:`Could not check`}),`, or `,_jsx(_components.strong,{children:`Check failed`}),`), the value it read with the\ncomparison it made, and, when nothing was sent, why. On a task that notifies\nnobody when its condition holds, for example one created through the Platform\nAPI without a `,_jsx(_components.code,{children:`notification`}),` field, the two results of a check that finds it\nholding read\n`,_jsx(_components.strong,{children:`Condition met`}),` and `,_jsx(_components.strong,{children:`Still holding`}),`. While a check runs, it reads\n`,_jsx(_components.strong,{children:`Checking…`}),`. After a check that finds the condition starting to hold, the\nagent run it started appears in `,_jsx(_components.strong,{children:`History`}),` on the same page. The check reads\nthe metric with the creator’s data access, so only the creator sees the values\nit read and the error behind a `,_jsx(_components.strong,{children:`Check failed`}),`. Anyone else who can open the\ntask, an admin included, sees when it ran, its result, and why nothing was\nsent, for example `,_jsx(_components.em,{children:`“The metric could not be read. Nothing sent.”`})]}),`\n`,_jsx(Heading,{level:`3`,id:`changing-a-task’s-settings`,children:`Changing a task’s settings`}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.strong,{children:`Settings`}),` panel holds every `,_jsx(_components.a,{href:`#anatomy-of-a-task`,children:`setting of the task`}),`,\neach showing its saved value. `,_jsx(_components.strong,{children:`Update`}),` stays disabled until you change one;\npressing it saves only the settings you changed and shows `,_jsx(_components.em,{children:`“Scheduled task\nupdated”`}),`. `,_jsx(_components.strong,{children:`Name`}),` and `,_jsx(_components.strong,{children:`Instructions`}),` are required, and a condition that\nisn’t complete keeps `,_jsx(_components.strong,{children:`Update`}),` disabled and shows why.`]}),`\n`,_jsx(Heading,{level:`3`,id:`changing-a-task-with-the-agent`,children:`Changing a task with the agent`}),`\n`,_jsxs(_components.p,{children:[`The chat beside the settings works on the task on screen: every message you\nsend carries it, shown as a chip with the task’s name in the bottom row of the\nmessage box, beside the agent picker. A name too long for the chip is cut;\nhover the chip to read it whole. In a chat dragged narrow, the chip shrinks to\nits clock icon, which still shows the name on hover. Ask in plain language,\nfor example `,_jsx(_components.em,{children:`“run it every day at 8:00 instead”`}),` or `,_jsx(_components.em,{children:`“tell me only when\nmonthly orders change by 5% or more”`}),`, and the agent changes this task. The\n`,_jsx(_components.strong,{children:`Settings`}),` panel shows the change without a reload.`]}),`\n`,_jsxs(_components.p,{children:[`Changes you haven’t saved in the panel stay as you typed them when the agent\nchanges the task, and `,_jsx(_components.strong,{children:`Update`}),` stays enabled. Since `,_jsx(_components.strong,{children:`Update`}),` saves only\nthe settings you changed, it doesn’t undo a change the agent made to another\nsetting.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Hide chat`}),` and `,_jsx(_components.strong,{children:`Show chat`}),` in the header hide and show the chat; on a\nnarrow window, `,_jsx(_components.strong,{children:`Show chat`}),` opens it over the page.`]}),`\n`,_jsx(Heading,{level:`2`,id:`reading-the-output`,children:`Reading the output`}),`\n`,_jsxs(_components.p,{children:[`Each run creates a chat thread containing the agent’s response. Open the\nthread in `,_jsx(_components.a,{href:`/docs/explore-analyze/analytics-chat`,children:`Analytics Chat`}),` to read the\nfull answer, ask follow-up questions, or\n`,_jsx(_components.a,{href:`/docs/explore-analyze/workbooks`,children:`save results to a Workbook`}),`.\nScheduled-run threads are marked in the Recent chats sidebar with a clock\nicon (hover over it to see the “Scheduled task” tooltip).`]}),`\n`,_jsxs(_components.p,{children:[`A run shows as `,_jsx(_components.strong,{children:`Running`}),` while it executes, then completes or fails. A\nfailed run’s thread shows a failure notice instead of an empty thread.`]}),`\n`,_jsxs(_components.p,{children:[`A run’s thread carries no memory of earlier runs, so write the\n`,_jsx(_components.strong,{children:`Instructions`}),` as a complete request rather than a follow-up to the last\nrun.`]}),`\n`,_jsx(_components.p,{children:`The task runs headlessly under the security context of the user who created\nit, so it sees exactly the data that user can access.`}),`\n`,_jsx(Heading,{level:`3`,id:`notifying-people-when-a-run-finishes`,children:`Notifying people when a run finishes`}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.strong,{children:`Notify`}),` section of the task’s `,_jsx(_components.strong,{children:`Settings`}),` decides who hears about a\nfinished run, and how:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`People and groups`}),` — any workspace users and user groups, picked from\nthe same search as the `,_jsx(_components.strong,{children:`Share`}),` dialog. A group is expanded to its members\nwhen the run finishes, so people who join it later are notified too. A\nperson picked directly and through a group is notified once.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Send by`}),` — `,_jsx(_components.strong,{children:`Inbox`}),` (an `,_jsx(_components.a,{href:`/docs/inbox`,children:`inbox`}),` notification), `,_jsx(_components.strong,{children:`Email`}),`,\nand `,_jsx(_components.strong,{children:`Slack`}),`, in any combination. `,_jsx(_components.strong,{children:`Inbox`}),` and `,_jsx(_components.strong,{children:`Email`}),` go to every\nperson and group picked above. With `,_jsx(_components.strong,{children:`Slack`}),` on, pick one or more channels:\neach gets one post. If Slack isn’t connected to the workspace, the\n`,_jsx(_components.strong,{children:`Settings`}),` panel offers to connect it. `,_jsx(_components.strong,{children:`Inbox`}),` is unavailable when the\ninbox is off for the workspace, and a task saved with it on then sends no\ninbox notifications but still sends its other channels.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`A new task starts with you picked and `,_jsx(_components.strong,{children:`Inbox`}),` on, so it notifies you the way\nit did before; you can remove yourself. With every channel off, nobody is\nnotified, and the panel says so.`]}),`\n`,_jsxs(_components.p,{children:[`Each notification carries the task name, whether the run succeeded, the start\nof the agent’s answer, and a link that opens the run. Each Slack post carries\nthe same answer and link. Saving a task with a newly picked person or group\nshares the task with them, view-only, so the link opens the run for them,\nwhether they were picked in the task’s `,_jsx(_components.strong,{children:`Settings`}),`, by the agent, or through\nthe Platform API. Removing them from `,_jsx(_components.strong,{children:`Notify`}),` leaves the share in place;\nremove it in the `,_jsx(_components.strong,{children:`Share`}),` dialog. Besides the creator, a run notifies only\npeople who can open the task (admins, and anyone it’s shared with directly,\nthrough a group, or with the whole organization) and read its deployment. A\npicked person fails that in two ways: their share was removed in the `,_jsx(_components.strong,{children:`Share`}),`\ndialog after they were picked (saving the task again doesn’t share it back;\nremove them from `,_jsx(_components.strong,{children:`Notify`}),` and pick them again), or they can’t read the\ndeployment. The run skips them, and the `,_jsx(_components.strong,{children:`Settings`}),` panel marks them `,_jsx(_components.strong,{children:`Not\nshared: won’t be notified`}),` in both cases. Deactivated users and people\noutside the workspace get nothing.`]}),`\n`,_jsxs(_components.p,{children:[`Notifications go to the task’s recipients, whoever runs the task: an admin or\na user with `,_jsx(_components.strong,{children:`Manage all scheduled tasks`}),` who edits or runs it is notified\nonly if they are a recipient.`]}),`\n`,_jsx(_components.p,{children:`Each task email has an unsubscribe link. Unsubscribing stops that person’s\nemails from this task, scheduled runs included, until the task’s creator picks\nthem again directly.`}),`\n`,_jsxs(_components.p,{children:[`A failed run notifies only the task’s creator, if they are among the task’s\nrecipients, on the task’s `,_jsx(_components.strong,{children:`Inbox`}),` and `,_jsx(_components.strong,{children:`Email`}),` channels; other recipients\nand Slack channels get nothing. Notifications apply to both scheduled runs and\n`,_jsx(_components.strong,{children:`Run now`}),`. On a `,_jsx(_components.a,{href:`#conditional-tasks`,children:`conditional task`}),`, a check that runs no\nagent sends nothing. See `,_jsx(_components.a,{href:`/docs/inbox#notification-types`,children:`Inbox`}),` for what an\ninbox notification shows.`]}),`\n`,_jsxs(_components.p,{children:[`A task that you create with the agent or the Platform API notifies nobody,\nunless you ask for it: for example, `,_jsxs(_components.em,{children:[`“every Monday summarize sales, email it\nto the Finance group and `,_jsx(_components.a,{href:`mailto:anna@example.com`,children:`anna@example.com`}),`, and post it in #sales.”`]}),` The agent\nnames people by email and groups by name. Channels belong to the whole task,\nas in the `,_jsx(_components.strong,{children:`Settings`}),` panel: asking the agent to notify one more person by\ninbox turns `,_jsx(_components.strong,{children:`Inbox`}),` on for everyone the task notifies, and the agent tells\nyou so. With the Platform API, set the task’s `,_jsx(_components.code,{children:`notification`}),` field.`]}),`\n`,_jsx(Heading,{level:`3`,id:`what-the-agent-can-do-in-a-scheduled-run`,children:`What the agent can do in a scheduled run`}),`\n`,_jsx(_components.p,{children:`Beyond querying the semantic model, the agent in a scheduled run can:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Send email to workspace members`}),` — for example, `,_jsx(_components.em,{children:`“summarize yesterday’s\nsignups and email the summary to me.”`}),` This requires the agent email tool\nto be enabled for the workspace; recipients are restricted to workspace\nmembers.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Use web search`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Create and update reports, workbooks, and dashboards`}),`, using the task\ncreator’s permissions.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Work with the data model`}),` — for example, `,_jsx(_components.em,{children:`“review last week’s slow\nqueries and propose pre-aggregations for them.”`}),` The agent can read the\ndata model and query history, edit model files, and commit the changes to\nits own `,_jsx(_components.a,{href:`/docs/data-modeling/dev-mode`,children:`dev branch`}),`. This requires the\ntask’s creator to have the `,_jsx(_components.strong,{children:`Edit data model`}),` or `,_jsx(_components.strong,{children:`Edit data model on dev\nbranches`}),` `,_jsx(_components.a,{href:`/admin/users-and-permissions/custom-roles`,children:`permission`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Query data sources with SQL`}),`, if the task’s creator has the `,_jsx(_components.strong,{children:`Access SQL\nRunner`}),` permission.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`A scheduled run never publishes changes.`}),` It can’t merge to the main\nbranch, switch your active branch, or build pre-aggregations. To apply its\nchanges, review the branch it committed to and merge it yourself.`]}),`\n`,_jsx(Heading,{level:`2`,id:`managing-tasks-from-chat`,children:`Managing tasks from chat`}),`\n`,_jsxs(_components.p,{children:[`You can also create and manage Scheduled Tasks conversationally in\n`,_jsx(_components.a,{href:`/docs/explore-analyze/analytics-chat`,children:`Analytics Chat`}),` — from any chat, not\njust the one beside a task on its `,_jsx(_components.a,{href:`#task-detail-page`,children:`detail page`}),`. Ask the\nagent to schedule, update, list, or delete tasks in plain language — for\nexample, `,_jsx(_components.em,{children:`“schedule a daily summary of yesterday’s signups at 9am”`}),` or\n`,_jsx(_components.em,{children:`“list my scheduled tasks.”`}),` When the agent opens a task in the chat’s side\npanel, its pencil button opens the task’s detail page with that chat beside\nit. When `,_jsx(_components.a,{href:`/docs/explore-analyze/data-alerts`,children:`data alerts`}),` are turned on for\nyour account, an alert on a chart of a published dashboard is not a task: it\nbelongs to a scheduled refresh of that dashboard, and the agent doesn’t create\na task for it.`]}),`\n`,_jsxs(_components.p,{children:[`The agent’s actions render in the chat as labeled steps with a clock icon —\n`,_jsx(_components.em,{children:`“Creating scheduled task…”`}),` / `,_jsx(_components.em,{children:`“Created scheduled task”`}),`, `,_jsx(_components.em,{children:`“Listed\nscheduled tasks”`}),`, `,_jsx(_components.em,{children:`“Updated scheduled task”`}),`, and `,_jsx(_components.em,{children:`“Deleted scheduled\ntask”`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`The agent manages task definitions: when listing tasks, it can report each\ntask’s id, name, description, schedule, timezone, enabled state, next run\ntime, who it notifies and how, agent, and condition with its last check\n(the check’s values and error text only to the task’s creator). It can also\nadd, change, or remove a task’s `,_jsx(_components.a,{href:`#conditional-tasks`,children:`condition`}),` — for\nexample, `,_jsx(_components.em,{children:`“tell me when monthly orders change by 5% or more”`}),` — and pick the\nagent a task runs on, or set it back to `,_jsx(_components.strong,{children:`Deployment default`}),`. On a\ndeployment with more than 50 agents, the agent sees only 50 of them and says\nso; pick any other in the task’s `,_jsx(_components.strong,{children:`Settings`}),`. A task’s run history lives on\nits `,_jsx(_components.a,{href:`#task-detail-page`,children:`detail page`}),`. The agent follows the same\n`,_jsx(_components.a,{href:`#limits`,children:`limits`}),` and permissions as the `,_jsx(_components.strong,{children:`Scheduled`}),` page, and a scheduled\nrun can’t create or change tasks itself.`]}),`\n`,_jsx(Heading,{level:`2`,id:`managing-tasks-with-the-platform-api`,children:`Managing tasks with the Platform API`}),`\n`,_jsxs(_components.p,{children:[`You can also create, update, pause, run, and delete Scheduled Tasks from\nscripts and CI with the `,_jsx(_components.a,{href:`/api-reference/introduction`,children:`Platform API`}),` (by\ndefault, only admins can\n`,_jsx(_components.a,{href:`/admin/account-billing/api-keys#personal-api-keys`,children:`create API keys`}),`). Its\nScheduled Tasks endpoints follow the same `,_jsx(_components.a,{href:`#limits`,children:`limits`}),` and\n`,_jsx(_components.a,{href:`#managing-tasks`,children:`permissions`}),` as the `,_jsx(_components.strong,{children:`Scheduled`}),` page. A task’s\n`,_jsx(_components.code,{children:`notification`}),` field holds its\n`,_jsx(_components.a,{href:`#notifying-people-when-a-run-finishes`,children:`recipients and channels`}),`: `,_jsx(_components.code,{children:`channels`}),`\n(`,_jsx(_components.code,{children:`inbox`}),`, `,_jsx(_components.code,{children:`email`}),`, `,_jsx(_components.code,{children:`slack`}),`), `,_jsx(_components.code,{children:`userIds`}),`, `,_jsx(_components.code,{children:`groupIds`}),`, and `,_jsx(_components.code,{children:`slackChannels`}),`, with\nat most 1,000 users, 200 groups, and 50 Slack channels. An unknown user or\ngroup id is refused. The older `,_jsx(_components.code,{children:`notificationEnabled`}),` field is\ndeprecated: it reads whether the creator gets an inbox notification, and\nwriting it adds or removes that. A task’s optional\n`,_jsx(_components.code,{children:`condition`}),` field holds its `,_jsx(_components.a,{href:`#conditional-tasks`,children:`condition`}),` (`,_jsx(_components.code,{children:`null`}),` on an\nupdate removes it), and `,_jsx(_components.code,{children:`lastConditionCheck`}),` holds its latest check, whose\nvalues and error text are returned only to the task’s creator. See the\n`,_jsx(_components.a,{href:`/api-reference/scheduled-tasks/list-scheduled-tasks`,children:`API reference`}),` for the\nendpoints, fields, and responses.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":"dark","config":{},"pageMetadata":{"title":"Scheduled Tasks","description":"Save a natural-language agent prompt and have Cube run it automatically on a schedule, producing a chat thread for each run.","href":"/docs/explore-analyze/scheduled-tasks"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Where to find it","slug":"where-to-find-it","depth":2,"children":[]},{"title":"Anatomy of a task","slug":"anatomy-of-a-task","depth":2,"children":[]},{"title":"Schedule options","slug":"schedule-options","depth":2,"children":[]},{"title":"Conditional tasks","slug":"conditional-tasks","depth":2,"children":[]},{"title":"Limits","slug":"limits","depth":2,"children":[]},{"title":"Managing tasks","slug":"managing-tasks","depth":2,"children":[]},{"title":"Task detail page","slug":"task-detail-page","depth":2,"children":[{"title":"Changing a task’s settings","slug":"changing-a-task’s-settings","depth":3,"children":[]},{"title":"Changing a task with the agent","slug":"changing-a-task-with-the-agent","depth":3,"children":[]}]},{"title":"Reading the output","slug":"reading-the-output","depth":2,"children":[{"title":"Notifying people when a run finishes","slug":"notifying-people-when-a-run-finishes","depth":3,"children":[]},{"title":"What the agent can do in a scheduled run","slug":"what-the-agent-can-do-in-a-scheduled-run","depth":3,"children":[]}]},{"title":"Managing tasks from chat","slug":"managing-tasks-from-chat","depth":2,"children":[]},{"title":"Managing tasks with the Platform API","slug":"managing-tasks-with-the-platform-api","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/cubed3/664218bb78b6ac43/cube-tracking.js","/_mintlify/custom/cubed3/73c42f6b43b9b3b0/scripts/extract-chat.js","/_mintlify/custom/cubed3/8cdb0d4163a42096/scripts/extract-core-data.js","/_mintlify/custom/cubed3/2a4cd4489f51af38/clay.js"],"subdomain":"cubed3","siteName":"Cube Documentation","title":"Scheduled Tasks - Cube Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-30T22:35:39.596Z","originalFileLocation":"docs/explore-analyze/scheduled-tasks.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Save a natural-language agent prompt and have Cube run it automatically on a schedule, producing a chat thread for each run.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Cube Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/cubed3/JtLYPWhDFrYGSK8W/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/cubed3/JtLYPWhDFrYGSK8W/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/cubed3/JtLYPWhDFrYGSK8W/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/cubed3/JtLYPWhDFrYGSK8W/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/cubed3/JtLYPWhDFrYGSK8W/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/cubed3/JtLYPWhDFrYGSK8W/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/cubed3/JtLYPWhDFrYGSK8W/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/cubed3/JtLYPWhDFrYGSK8W/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/cubed3/JtLYPWhDFrYGSK8W/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Scheduled Tasks - Cube Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Save a natural-language agent prompt and have Cube run it automatically on a schedule, producing a chat thread for each run.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Cube Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.cube.dev/docs/explore-analyze/scheduled-tasks\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://cubed3.mintlify.app/_mintlify/api/og/v2?division=Explore+%26+Analyze\u0026amp;title=Scheduled+Tasks\u0026amp;description=Save+a+natural-language+agent+prompt+and+have+Cube+run+it+automatically+on+a+schedule%2C+producing+a+chat+thread+for+each+run.\u0026amp;theme=784e8a91f0fc65e42d72e853\u0026amp;signature=6a07a14373d75327a6bbe8d8beb4fe10d56017b8acbaafc75b194b3ed1103574\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Scheduled Tasks - Cube Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Save a natural-language agent prompt and have Cube run it automatically on a schedule, producing a chat thread for each run.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://cubed3.mintlify.app/_mintlify/api/og/v2?division=Explore+%26+Analyze\u0026amp;title=Scheduled+Tasks\u0026amp;description=Save+a+natural-language+agent+prompt+and+have+Cube+run+it+automatically+on+a+schedule%2C+producing+a+chat+thread+for+each+run.\u0026amp;theme=784e8a91f0fc65e42d72e853\u0026amp;signature=6a07a14373d75327a6bbe8d8beb4fe10d56017b8acbaafc75b194b3ed1103574\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/cubed3/JtLYPWhDFrYGSK8W/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Cube Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#5339CF\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.cube.dev/docs/explore-analyze/scheduled-tasks\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/explore-analyze/scheduled-tasks.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.cube.dev/#organization\",\"name\":\"Cube Documentation\",\"url\":\"https://docs.cube.dev\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/cubed3/wCTntgEXVYYYnx4l/logo/light.svg?fit=max\u0026auto=format\u0026n=wCTntgEXVYYYnx4l\u0026q=85\u0026s=8bbf45ba64eac6116629064fac55aad7\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.cube.dev#website\",\"name\":\"Cube Documentation\",\"url\":\"https://docs.cube.dev\",\"publisher\":{\"@id\":\"https://docs.cube.dev/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.cube.dev/docs/explore-analyze/scheduled-tasks#webpage\",\"url\":\"https://docs.cube.dev/docs/explore-analyze/scheduled-tasks\",\"name\":\"Scheduled Tasks\",\"description\":\"Save a natural-language agent prompt and have Cube run it automatically on a schedule, producing a chat thread for each run.\",\"dateModified\":\"2026-10-30T22:35:39.596Z\",\"isPartOf\":{\"@id\":\"https://docs.cube.dev#website\"},\"breadcrumb\":{\"@id\":\"https://docs.cube.dev/docs/explore-analyze/scheduled-tasks#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.cube.dev/docs/explore-analyze/scheduled-tasks#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Explore \u0026 Analyze\",\"item\":\"https://docs.cube.dev/docs/explore-analyze/workbooks/querying-data\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Scheduled Tasks\",\"item\":\"https://docs.cube.dev/docs/explore-analyze/scheduled-tasks\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.cube.dev/docs/explore-analyze/scheduled-tasks#article\",\"headline\":\"Scheduled Tasks\",\"name\":\"Scheduled Tasks\",\"description\":\"Save a natural-language agent prompt and have Cube run it automatically on a schedule, producing a chat thread for each run.\",\"url\":\"https://docs.cube.dev/docs/explore-analyze/scheduled-tasks\",\"mainEntityOfPage\":{\"@id\":\"https://docs.cube.dev/docs/explore-analyze/scheduled-tasks#webpage\"},\"dateModified\":\"2026-10-30T22:35:39.596Z\",\"publisher\":{\"@id\":\"https://docs.cube.dev/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.cube.dev#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Cube Documentation\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Cube Documentation","nav":{"global":null,"tabs":[{"tab":"Documentation","groups":[{"group":"Getting Started","pages":[{"title":"Introduction","href":"/docs/introduction"},{"title":"Preferences","href":"/docs/preferences"},{"title":"Inbox","href":"/docs/inbox"},{"group":"Getting Started","pages":[{"title":"Connect your data","href":"/docs/getting-started/connect-your-data"},{"title":"Use analytics chat","href":"/docs/getting-started/use-analytics-chat"},{"title":"Create workbooks and dashboards","href":"/docs/getting-started/create-workbooks-and-dashboards"},{"title":"Develop in IDE","href":"/docs/getting-started/develop-in-ide"},{"title":"Embed analytics","href":"/docs/getting-started/embed-analytics"}]},{"group":"Migrate from Cube Core","pages":[{"title":"Import a local project to Cube Cloud with CLI","href":"/docs/getting-started/migrate-from-core/upload-with-cli"},{"title":"Import a GitHub repository","href":"/docs/getting-started/migrate-from-core/import-github-repository"},{"title":"Import a GitLab repository","href":"/docs/getting-started/migrate-from-core/import-gitlab-repository-via-ssh"},{"title":"Import a Git repository","href":"/docs/getting-started/migrate-from-core/import-git-repository-via-ssh"},{"title":"Import a Bitbucket repository","href":"/docs/getting-started/migrate-from-core/import-bitbucket-repository-via-ssh"}]}]},{"group":"Explore \u0026 Analyze","pages":[{"group":"Workbooks","root":{"title":"Workbooks","href":"/docs/explore-analyze/workbooks/index"},"pages":[{"title":"Querying data","href":"/docs/explore-analyze/workbooks/querying-data"},{"title":"Calculated fields","href":"/docs/explore-analyze/workbooks/calculated-fields"},{"title":"Source SQL Tabs","href":"/docs/explore-analyze/workbooks/source-sql-tabs"},{"title":"Python analysis","href":"/docs/explore-analyze/workbooks/python-analysis"},{"title":"Workbook Agent","href":"/docs/explore-analyze/workbooks/workbook-agent"}]},{"title":"Explore","href":"/docs/explore-analyze/explore"},{"group":"Charts","root":{"title":"Charts","href":"/docs/explore-analyze/charts/index"},"pages":[{"group":"Chart types","root":{"title":"Chart types","href":"/docs/explore-analyze/charts/chart-types/index"},"pages":[{"title":"Bar","href":"/docs/explore-analyze/charts/chart-types/bar"},{"title":"Line","href":"/docs/explore-analyze/charts/chart-types/line"},{"title":"Area","href":"/docs/explore-analyze/charts/chart-types/area"},{"title":"Scatter","href":"/docs/explore-analyze/charts/chart-types/scatter"},{"title":"Pie \u0026 donut","href":"/docs/explore-analyze/charts/chart-types/pie"},{"title":"Funnel","href":"/docs/explore-analyze/charts/chart-types/funnel"},{"title":"Sankey","href":"/docs/explore-analyze/charts/chart-types/sankey"},{"title":"Heatmap","href":"/docs/explore-analyze/charts/chart-types/heatmap"},{"title":"Boxplot","href":"/docs/explore-analyze/charts/chart-types/boxplot"},{"title":"Table","href":"/docs/explore-analyze/charts/chart-types/table"},{"title":"KPI","href":"/docs/explore-analyze/charts/chart-types/kpi"},{"title":"Map","href":"/docs/explore-analyze/charts/chart-types/map"},{"title":"HTML","href":"/docs/explore-analyze/charts/chart-types/html"}]},{"title":"Custom visualizations","href":"/docs/explore-analyze/charts/custom"},{"group":"Configure charts","root":{"title":"Configure charts","href":"/docs/explore-analyze/charts/configuration/index"},"pages":[{"title":"Series mapping","href":"/docs/explore-analyze/charts/configuration/series-mapping"},{"title":"Series configuration","href":"/docs/explore-analyze/charts/configuration/series-configuration"},{"title":"Color \u0026 stacking","href":"/docs/explore-analyze/charts/configuration/color-and-stacking"},{"title":"Small multiples","href":"/docs/explore-analyze/charts/configuration/small-multiples"},{"title":"Axes","href":"/docs/explore-analyze/charts/configuration/axes"},{"title":"Tooltips","href":"/docs/explore-analyze/charts/configuration/tooltips"},{"title":"Data labels","href":"/docs/explore-analyze/charts/configuration/data-labels"}]}]},{"title":"Analytics Chat","description":"Conversational analytics interface for asking plain-language questions and getting trusted, AI-powered insights from your semantic layer.","href":"/docs/explore-analyze/analytics-chat"},{"title":"Scheduled Tasks","href":"/docs/explore-analyze/scheduled-tasks"},{"title":"Agent skills","description":"Run saved agent workflows using skill buttons, the slash menu, or automatic matching.","href":"/docs/explore-analyze/skills"}]},{"group":"Present \u0026 Share","pages":[{"group":"Dashboards","root":{"title":"Dashboards","href":"/docs/explore-analyze/dashboards/index"},"pages":[{"group":"Widgets","root":{"title":"Widgets","href":"/docs/explore-analyze/dashboards/widgets/index"},"pages":[{"title":"Charts","href":"/docs/explore-analyze/dashboards/widgets/charts"},{"title":"Text","href":"/docs/explore-analyze/dashboards/widgets/text"},{"title":"Controls","href":"/docs/explore-analyze/dashboards/widgets/controls"},{"title":"AI summary","href":"/docs/explore-analyze/dashboards/widgets/ai-summary"},{"title":"Spacer, Divider, Stack, Grid \u0026 Tabs","href":"/docs/explore-analyze/dashboards/widgets/layout"}]},{"title":"Styling","href":"/docs/explore-analyze/dashboards/styling"},{"title":"Dashboards as code","href":"/docs/explore-analyze/dashboards/dashboards-as-code"},{"title":"Dashboard Agent","href":"/docs/explore-analyze/dashboards/dashboard-agent"},{"title":"Comments","href":"/docs/explore-analyze/dashboards/comments"},{"title":"Reviews","href":"/docs/explore-analyze/dashboards/reviews"}]},{"title":"Apps","href":"/docs/explore-analyze/apps"},{"title":"Scheduled Refreshes","href":"/docs/explore-analyze/scheduled-refreshes"},{"title":"Data alerts","href":"/docs/explore-analyze/data-alerts"},{"title":"Google Sheets deliveries","href":"/docs/explore-analyze/google-sheets-deliveries"},{"title":"Notifications","href":"/docs/explore-analyze/notifications"}]},{"group":"Organize content","pages":[{"title":"Folders","href":"/docs/organize-content/folders"},{"title":"Share content","href":"/docs/organize-content/sharing"}]},{"group":"Data Modeling","pages":[{"title":"Getting started","href":"/docs/data-modeling/overview"},{"group":"Views","root":{"title":"Views","href":"/docs/data-modeling/views"},"pages":[{"title":"Multi-fact views","href":"/docs/data-modeling/multi-fact-views"},{"title":"View groups","href":"/docs/data-modeling/view-groups"}]},{"group":"Cubes","root":{"title":"Cubes","href":"/docs/data-modeling/cubes"},"pages":[{"title":"Extending cubes and views","href":"/docs/data-modeling/extending-cubes"}]},{"title":"Joins","href":"/docs/data-modeling/joins"},{"title":"Measures","href":"/docs/data-modeling/measures"},{"title":"Dimensions","href":"/docs/data-modeling/dimensions"},{"title":"Calendar cubes","href":"/docs/data-modeling/concepts/calendar-cubes"},{"title":"AI context","href":"/docs/data-modeling/ai-context"},{"title":"Syntax","href":"/docs/data-modeling/concepts/syntax"},{"group":"Access Control","pages":[{"title":"Access Control","sidebarTitle":"Overview","href":"/docs/data-modeling/access-control/index"},{"title":"Access policies","href":"/docs/data-modeling/data-access-policies"},{"title":"Row-level security","href":"/docs/data-modeling/access-control/row-level-security"},{"title":"Member-level security","href":"/docs/data-modeling/access-control/member-level-security"},{"title":"Security context","href":"/docs/data-modeling/access-control/context"}]},{"group":"Dynamic Data Models","root":{"title":"Dynamic Data Models","href":"/docs/data-modeling/dynamic/index"},"pages":[{"title":"Data modeling with YAML, Jinja, and Python","href":"/docs/data-modeling/dynamic/jinja"},{"title":"Data modeling with JavaScript","href":"/docs/data-modeling/dynamic/javascript"},{"title":"Export and import","href":"/docs/data-modeling/dynamic/code-reusability-export-and-import"},{"title":"Execution Environment (JavaScript)","href":"/docs/data-modeling/dynamic/schema-execution-environment"}]},{"title":"Configuration","href":"/docs/data-modeling/configuration"},{"group":"Developing Model","pages":[{"title":"Visual Modeler","href":"/docs/data-modeling/visual-modeler"},{"title":"Data Model IDE","href":"/docs/data-modeling/data-model-ide"},{"title":"Development mode","href":"/docs/data-modeling/dev-mode"},{"title":"Access Policies viewer","href":"/docs/data-modeling/access-policies-viewer"},{"title":"Content Validator","href":"/docs/data-modeling/content-validator"}]}]},{"group":"Pre-aggregations","pages":[{"title":"Overview","href":"/docs/pre-aggregations/index"},{"title":"Getting started with pre-aggregations","href":"/docs/pre-aggregations/getting-started-pre-aggregations"},{"title":"Using pre-aggregations","href":"/docs/pre-aggregations/using-pre-aggregations"},{"title":"Matching queries with pre-aggregations","href":"/docs/pre-aggregations/matching-pre-aggregations"},{"title":"Refreshing pre-aggregations","href":"/docs/pre-aggregations/refreshing-pre-aggregations"},{"title":"Lambda pre-aggregations","href":"/docs/pre-aggregations/lambda-pre-aggregations"},{"title":"Cube Store architecture","href":"/docs/pre-aggregations/cube-store-architecture"}]},{"group":"Integrations","pages":[{"title":"Slack","href":"/docs/integrations/slack"},{"title":"Tableau Integration","sidebarTitle":"Tableau","hidden":true,"href":"/docs/integrations/tableau"},{"title":"Microsoft Power BI","hidden":true,"href":"/docs/integrations/power-bi/index"},{"title":"Cube for Excel","href":"/docs/integrations/microsoft-excel"},{"title":"Cube for Sheets","href":"/docs/integrations/google-sheets"},{"title":"Snowflake Semantic Views Integration","sidebarTitle":"Snowflake Semantic Views","href":"/docs/integrations/snowflake-semantic-views"},{"title":"Databricks Metric Views","href":"/docs/integrations/databricks-metric-views"},{"title":"Apache Ossie","href":"/docs/integrations/apache-ossie"},{"title":"dbt Integration","sidebarTitle":"dbt","href":"/docs/integrations/dbt"},{"group":"Semantic Layer Sync","root":{"title":"Semantic Layer Sync","hidden":true,"href":"/docs/integrations/semantic-layer-sync/index"},"pages":[{"title":"Semantic Layer Sync with Apache Superset","sidebarTitle":"Superset","hidden":true,"href":"/docs/integrations/semantic-layer-sync/superset"},{"title":"Semantic Layer Sync with Preset","sidebarTitle":"Preset","hidden":true,"href":"/docs/integrations/semantic-layer-sync/preset"},{"title":"Semantic Layer Sync with Tableau","sidebarTitle":"Tableau","hidden":true,"href":"/docs/integrations/semantic-layer-sync/tableau"}]},{"title":"MCP server","href":"/docs/integrations/mcp-server"},{"title":"Cube agent skills","href":"/docs/integrations/agent-skills"}]}]},{"tab":"Admin","pages":[{"title":"Admin","href":"/admin/connect-to-data"}]},{"tab":"Embedding","pages":[{"title":"Embedding","href":"/embedding"}]},{"tab":"Reference","pages":[{"title":"Reference","href":"/reference/data-modeling/cube"}]},{"tab":"Cube Core","pages":[{"title":"Cube Core","href":"/cube-core"}]},{"tab":"Recipes","pages":[{"title":"Recipes","href":"/recipes"}]},{"tab":"API","pages":[{"title":"API","href":"/api-reference/introduction"}]}]},"basePath":"","title":"Scheduled Tasks - Cube Documentation","buildId":"dpl_DeHjVRGfFnhYQwHnfC2pjeXXv8h9","deploymentId":"dpl_DeHjVRGfFnhYQwHnfC2pjeXXv8h9","dynamics":[],"chunks":[]}