Skip to content

Scheduled tasks ​

4 min read

Scheduled tasks let an agent run work on a specific date or repeatedly. Use them for reviews, reminders, monitoring, and reports that do not need to be started manually.

Choose the task type ​

TypeUse
MessageSends an instruction for the agent to interpret and act on. It can use a model different from the usual one.
ScriptRuns a command without invoking a model. Only the agent itself can create it from its environment; it can also use kj-ask occasionally to reason while it runs.

A task can run once or repeat on a schedule. One-off tasks retain their history after they finish; if you extend their date or number of runs, they can become active again.

Agents create scripts

From the dashboard, you can view, run, pause, edit, or archive an existing script task, but the agent creates it. This avoids scheduling commands before the agent has defined the environment and access it needs.

A pure script runs its command without waking a reasoning model, so it adds no model usage. Only kj-ask calls in a hybrid script consume model usage.

A script with reasoning ​

A hybrid task is not a third selector in the dashboard: it is a Script task that calls kj-ask only when it needs the agent's judgement. The script handles mechanical operations—querying an API, transforming data, or updating a system—and the agent intervenes only to interpret or decide.

bash
issues=$(get_open_issues)

if [ -n "$issues" ]; then
  urgent=$(kj-ask "Prioritize these issues: $issues. Return only urgent IDs.")
  mark_as_urgent "$urgent"
fi

kj-ask asks the agent within that task's dedicated thread. Its answer is returned through standard output so the script can use it. The agent retains its usual working context, including assigned memories and access.

Use the model only where it adds value

Choose this option when most work is repeatable and there are only one or more decision points. It avoids running a full agent turn on every recurrence and consumes model usage only in kj-ask calls.

Temporary monitors ​

A monitor is an internal scheduled task the agent creates to keep track of something while working. It is not a third execution type: it can use an instruction or a script, but is identified as the agent's follow-up work.

Check later

The agent can check a condition again after a period of time: for example, whether a deployment has finished or an expected response has arrived.

Poll a status

It can repeat a check for a limited time and notify only when it finds a change or problem.

End on its own

Monitors have a required expiry date. This prevents checks from staying active after the matter is over.

By default, a monitor lasts at most one day when the agent does not specify another period; it can never last more than seven days. At expiry it stops running and is automatically cleaned up after a short period for reviewing its result.

Monitors do not appear in the ordinary task list, so they do not hide the automations the team manages. Include internal tasks when reviewing an agent if you need to check what it is following or stop a particular monitor.

Limit a recurrence ​

Set an end date, a maximum number of runs, or both. When either limit is reached, the task is no longer scheduled.

The time zone can be set per task. If you do not specify it, it inherits the agent's and, ultimately, the organization's.

Minimum frequency

The minimum frequency depends on your subscribed plan. See Plans and limits before designing high-frequency tasks.

Notify the result ​

A task can post its result to a specific conversation when it finishes. For script tasks, you can also choose whether it notifies always, only when output changes, when a pattern matches, or never. Errors are notified unless you chose not to send alerts.

Share and supervise ​

A task is private to its creator until it is shared with other members. Administrators and owners can view all the organization's tasks.

From the list, you can run it manually, pause it, edit it, delete it, and view its run history. The history indicates whether it completed successfully, failed, timed out, or was skipped.

Permissions ​

Tasks can be private to their creator or shared with other members. General view permission lets you see your own, shared, and internal tasks; full organization-wide oversight requires an additional permission.

ActionPermission
View own, shared, and internal taskscronjob.view
View every task in the organizationcronjob.view.all
Create a message taskcronjob.create
Edit or pause a taskcronjob.edit
Run a task manuallycronjob.execute
Archive or delete a taskcronjob.delete

Automate after validating

Test a task manually or with a one-off run before making it recurring. This validates the instruction, notification channel, and the agent's permissions.

Secrets in scripts ​

A script task can receive credentials as environment variables while it runs. Do not include secrets directly in the command or task description.