Install
openclaw skills install rotating-single-target-cronCreate or update recurring chat cron jobs that choose exactly one @ID from a configured list on each run, avoid repeating the previous target, persist the la...
openclaw skills install rotating-single-target-cronUse this skill to build or maintain cron jobs that rotate across a roster of @IDs. Each run should pick exactly one target, avoid the immediately previous target when alternatives exist, update a state file, and send only one final message.
Default assumptions for this pattern:
memory/Ask only for missing essentials:
Create or maintain a plain text state file in the workspace. Recommended naming:
memory/<job-slug>-last-target.txt
State rules:
@ID or nonenonenoneThe scheduled prompt should instruct the runtime to do this sequence:
Keep the payload strict about output shape. Unless the user says otherwise, include these rules:
@ID naturally near the beginningFor a new job:
sessionTarget="isolated"For an update:
In active group chats, do not trigger a live run unless the user explicitly asks. If the user asks to test:
Common edits:
When converting an older multi-target job into this pattern, initialize or repair the state file so the first rotated run starts cleanly.
Use this as the base structure and replace placeholders with the user's style/content requirements.
Send exactly one message to the current chat every day at <HH:MM> (<TZ>).
Roster: <@id list>
State file: memory/<job-slug>-last-target.txt
You must follow these rules exactly:
1. Before generating anything, read the state file. If the file does not exist, is empty, or contains an ID not in the roster, treat the previous target as "none".
2. Randomly select exactly one person from the roster as the only target for this run.
3. Never pick the same target as last time when any other valid option exists.
4. After choosing the target, immediately overwrite the state file with that target's @ID.
5. Do not mention any other IDs from the roster in the final output.
6. Output only the final chat message. Do not add explanations, titles, labels, or commentary.
7. Mention the selected @ID naturally near the beginning of the message.
8. Follow these content requirements exactly:
<content brief and style constraints>
Read references/examples.md when you need ready-made prompt patterns for common variants such as heartbreak stories, wake-up copy, teasing posts, or fortune-style rotations.
Before finishing, verify:
memory/