write_rotation
Set a workout plan in rotation mode so routines run in turn (A → B → C → A) instead of on fixed weekdays. Optionally adopt a running planner queue as your own.
Instructions
Set the rotation: the routines trained in turn (A → B → C → A …), not tied to weekdays; the next session is the first one of the round not done yet, on whatever day is trained next. Switches the plan to rotation mode. Editing a running rotation keeps the round's progress (done is by routine since the round began), clears date pins of routines taken out, and starts the next round when the edit leaves the current one complete. When a round completes, logging its last workout starts the next round the day after. Weekday routines stay and count on top of the loop. A planner's queue (written by write_session_queue or another app) shows as "Externally managed" in the app: the app does not refill it, and the user can adopt it as their own rotation. adopt: true takes such a queue over as the user's own rotation. openGym merges settings and the plan one setting and one day at a time: only a device that changes the same setting or day later, before it syncs, keeps its own value.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| adopt | No | Take over a planner's queue that is running now (default false: refused) | |
| routineIds | Yes | The routines in order, each once |