Overview
/loop lets Qoder CLI CN run the same prompt or slash command repeatedly. It suits polling status, continuous checks, and periodic repeated actions — for example "check the deployment every 5 minutes" or "look at the PR queue every half hour."
/loop has two modes:
- Fixed interval: give a time interval, and Qoder converts it into the corresponding recurring schedule and creates a scheduled task.
- Dynamic pacing: give no interval, and the Agent decides the timing of the next check on its own based on task progress — good for monitoring tasks with no fixed rhythm, like "watch CI until it goes green."
Command format
interval: optional time interval. When specified, the task runs at a fixed interval; when omitted, dynamic pacing mode kicks in and the Agent decides the timing of the next run.prompt: the prompt or slash command to run repeatedly.
Interval syntax
In fixed-interval mode, an interval consists of a number plus a unit, with four supported units:
| Unit | Meaning | Example |
|---|---|---|
s | seconds | 30s |
m | minutes | 5m |
h | hours | 2h |
d | days | 1d |
30s is treated as 1m, and Qoder tells you the actual rounded interval.
Interval-to-Cron conversion rules:
| Interval | Resulting schedule | Notes |
|---|---|---|
Nm (N ≤ 59) | every N minutes | |
Nm (N ≥ 60) | rounded to hours | must divide 24 hours evenly |
Nh (N ≤ 23) | every N hours | |
Nd | every N days at midnight (local time) | |
Ns | rounded up to minutes | minimum 1 minute |
If an interval doesn't divide its unit evenly (e.g.7mproduces an uneven gap from :56 to :00, and90mcan't be expressed on the hour), Qoder picks the nearest clean interval and tells you what it rounded to before creating the task.
Two ways to write it
The interval can go at the beginning, or be expressed with a trailing every clause:
- Leading interval:
/loop 5m check the deploy→ interval5m, promptcheck the deploy. - Trailing every clause:
/loop check the deploy every 20m→ interval20m, promptcheck the deploy. Natural phrasings likeevery 5 minutesandevery 2 hoursare also supported.
every counts as an interval only when followed by a time expression. For example, in /loop check every PR the every is not a time expression — it is treated as part of the prompt, and the whole command enters dynamic pacing mode.
Automatic expiry and cancellation
A fixed-interval /loop creates a recurring task that expires automatically 7 days after creation. If you need it to run long-term, recreate it after expiry.
After successful creation, Qoder tells you what was scheduled, the corresponding cycle, the automatic expiry time, and the task id used for cancellation. To stop early, ask Qoder to cancel the loop task by that id. In dynamic pacing mode, the loop ends when the Agent no longer schedules the next wake-up.
For the full parameters, defaults, and expiry rules, see Loop Command Reference.