Run prompts on a schedule
Use /loop and cron scheduling tools to run prompts repeatedly, poll for status, or set one-time reminders within a Hawa Code session.
Scheduled tasks let Hawa Code automatically re-run a prompt at intervals. Use them to poll deployments, monitor PRs, check on long-running builds, or remind yourself to do something later. Tasks are session-scoped: they exist in the current Hawa Code process and disappear when you exit.
Schedule recurring prompts with /loop
/loop is the fastest way to schedule recurring prompts. Pass an optional interval and a prompt, and Hawa Code sets up a cron job that fires in the background while the session stays open.
/loop 5m check if the deployment finished and tell me what happened |
Hawa Code parses the interval, converts it to a cron expression, schedules the job, and confirms the cadence and job ID.
Interval configuration
Intervals are optional. You can place them at the beginning, at the end, or omit them entirely.
| Form | Example | Parsed interval |
|---|---|---|
| Leading token | /loop 30m check the build |
every 30 minutes |
| Trailing interval | /loop check the build every 2 hours |
every 2 hours |
| No interval | /loop check the build |
defaults to every 10 minutes |
Supported units are s for seconds, m for minutes, h for hours, and d for days. Since cron has one-minute granularity, seconds are rounded up to the nearest minute. Intervals that don’t divide evenly into their unit, such as 7m or 90m, are rounded to the nearest clean interval and Hawa Code tells you what it picked.
Loop over other commands
The scheduled prompt can itself be a command or skill invocation. This is useful for re-running a workflow you’ve already packaged.
/loop 20m /review-pr 1234 |
Each time the job fires, Hawa Code runs /review-pr 1234 as if you had typed it.
One-time scheduled tasks
The /loop command is for periodic tasks. If you need to execute a task once at a specific time, use the following command:
Create a scheduled task to execute project deployment at 13:00 today |
Manage scheduled tasks
You can ask Hawa Code to list or cancel tasks in natural language, or use the underlying tools directly.
Example: List tasks
What scheduled tasks do I have? |
Example: Cancel a task
Cancel the deploy check task |
Tools
Hawa Code uses these tools under the hood to manage scheduled tasks:
| Tool | Purpose |
|---|---|
CronCreate |
Schedule a new task. Takes a 5-field cron expression, the prompt to run, and whether to repeat or run once |
CronList |
List all scheduled tasks, including ID, schedule, and prompt |
CronDelete |
Cancel a task by ID |
Each scheduled task has an 8-character ID that you can pass to CronDelete to cancel it. A session can hold up to 50 scheduled tasks at once.
How scheduled tasks run
The scheduler checks for due tasks every second and queues them at low priority. Scheduled prompts fire between your turns, not while Hawa Code is mid-response. If a task is due while Hawa Code is busy, the prompt waits until the current turn finishes.
All times are interpreted in your local timezone. For example, the cron expression 0 9 * * * means 9 AM in the local timezone where you’re running Hawa Code, not UTC.
Lifecycle
Scheduled tasks exist within the current session. If Hawa Code is closed, the scheduled tasks will also be terminated.
Three-day expiry
Repeating tasks automatically expire after 3 days. The task fires one last time and then deletes itself. This limits how long forgotten loops can run.