Skip to content

Scheduled tasks

A scheduled task gives a sandbox’s agent a task, or runs a command, at set times: a morning news summary, nightly tests, a weekly report. An asleep sandbox wakes for each run and goes back to sleep afterwards, so it only uses what the run takes.

For a sandbox with an agent, Ask the agent takes a message written as you’d write it in the chat, such as “Summarise this morning’s news about our industry in five short points”. Each run starts a new conversation, which you can read in the sandbox’s chat, and the agent’s reply is kept with the run. The agent follows the sandbox’s instructions.

The reply can also go to a chat the sandbox is connected to on Telegram, Slack, Discord, Microsoft Teams or WhatsApp: choose it under Also send the reply to. Any chat that has talked to the agent through that connection can be chosen, for example “every weekday at 9, post a summary of yesterday’s orders in our team channel”.

Run a command runs a shell command in the sandbox, as in its terminal. Each run keeps its output and exit code.

In the console, choose Scheduled tasks or a sandbox’s Tasks tab, then New task, and pick when it runs in your own time zone (“every weekday at 9:00”). Each task keeps its recent runs, with their output and exit code.

From the terminal, schedules are cron lines in UTC:

Terminal window
stillbox schedule add ws-7k2m9q4x8w3z5r6t "30 5 * * *" -- npm test
stillbox schedule add ws-7k2m9q4x8w3z5r6t "0 4 * * *" --ask "Summarise this morning's news in five points"
stillbox schedule runs ws-7k2m9q4x8w3z5r6t sched-...