write_session_queue
Queue routine sessions for the coming week in order, or clear the queue with null. The app shows it as externally managed and replaces any running rotation.
Instructions
Act as a planner: write the sessions of a coming week as a queue (the routines in order; the first one not done yet is the session of whatever day is trained next), or clear the queue with routineIds null. 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. It replaces whatever round is running, the app's own rotation included (the saved rotation stays). A session counts as done when a workout of its routine starts after the queue was written, or is dated from startsOn on and named after the routine (unless strict). Use write_rotation instead for 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 |
|---|---|---|---|
| label | No | Shown on Home, e.g. "Week 3" | |
| strict | No | Count only workouts started after the queue was written | |
| startsOn | No | The day the queue begins (default today); until then it waits | |
| routineIds | Yes | The sessions in order, each routine once; null clears the queue |