You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Proactive reminders 2/3: scheduled tasks and recurring summaries #354
After phase 1 (event reminders), users want Bots to act on a schedule: a morning summary, a weekly report, a daily check. This phase adds time-based triggers.
Part of the 3-phase proactive-reminders track. Depends on phase 1 (event reminders). Related: #349, #352.
Scope
Schedules: create, edit, pause, delete recurring or one-off schedules (daily, weekly, cron-like), with timezone shown explicitly.
What a schedule does: runs a saved prompt on a chosen Bot and delivers the result as a reminder or card (reusing phase 1 delivery and the Agent inbox board).
Visible management: a list of schedules with next run, last run result and failures; failed runs show a reason and can be retried.
Missed runs: if the app was closed, define and show behavior (run once on start, or skip), never silently run many catch-up runs.
Triage on main 7b9e90b, 2026-10-19 ~12:10 Asia/Shanghai: needs-human, not agent-ready. Depends on #353 (phase 1) and needs an owner go-ahead and scope (where scheduled tasks live, who may create them).
Scheduled tasks via DSH's schedule service (core/src/host/schedules.js, core/src/client/schedules.js): Settings → Scheduled tasks, a Bot's card and its details line. Once / every day / every week / repeat every N minutes, cron shown when present, timezone shown when it differs from local, Next: time, delete with a click-again confirm. Targets a Bot's chat or a group chat. Tasks follow a Bot to a fresh part of its chat. Automation tasks are on by default (Switch on DSH Automation tasks by default, once per profile; the hint opens Plugins #381).
A due task counts as the owner's turn only while the Bot is not shared (turn-origin.js, scheduled verdict), and it goes through the normal approvals.
Expected behavior
From Settings → Scheduled tasks I can edit or pause a task without deleting it. Each task shows its last run and whether it failed. The docs say what happens to a run missed while the app was closed (at most one catch-up run, never many).
First slice (smallest shippable step)
Edit: the row opens the existing TaskForm already filled in. Saving creates the new task first and then deletes the old one, the same create-then-delete pattern as moveSchedules, so a failure keeps the old task.
Pause / Resume: if DSH's service has no pause, Pause keeps the task's request in FlyBot's store and removes it from DSH, and Resume creates it again. The row reads Paused.
Missed runs: check what DSH does and write it in docs/subsystems/core-host.md with a test.
Tests in core/test/schedules*.test.js.
Details I decided (say if you disagree)
Who may create tasks: unchanged (the owner in Settings, and the owner's own Bots through the tool; never a friend's Bot).
UI copy is English with the existing zh strings. One word per action: Edit, Pause, Resume.
Question for the owner
Which gap first: (a) Edit + Pause/Resume + documented missed runs; (b) last run and failed runs shown (needs #353/#349 first); or (c) treat #354 as done by the current Scheduled tasks, close it, and file the gaps as small issues?
Recommendation: (a).
Owner decision (2026-10-20): Confirmed option (a): next, add edit and pause/resume for scheduled tasks, then document what happens to a missed run while the app is closed (at most one catch-up run).
Minor decisions made while implementing the first slice (PR #474, 2026-10-20 09:07 Asia/Shanghai):
Edit in place when possible. DSH's schedule service has a compare-and-update (update with the exact listed record). When the task stays on the same chat, Edit uses it, so the task keeps its id, next run and delivery records (useful for the later "last run" slice, Scheduled tasks: last run result, failed runs with retry, and limits (#354 follow-up) #473); the timing is sent only when it changed, so a rename does not move the next run. Create-then-delete (as in the triage) is used when the task moves to another Bot or group chat, or for a finished one-time task DSH cannot update. Either way a failure keeps the old task.
Edit UI. A pencil Edit on each row (Settings → Scheduled tasks and the Bot's card) turns that row into the existing form, filled in, with Save changes. An edited daily/weekly task keeps its own time zone; a cron rule (no control in the form) is kept unless another kind is picked.
Pause stores the task record in FlyBot's state (pausedSchedules) before DSH deletes it; a failed delete rolls back. Resume recreates it on the Bot's current part; a failed create keeps it paused. A recurring task's next run is computed afresh on Resume (no catch-up for the paused time). A paused task can be edited (stays paused) or deleted. A one-time task whose time passed while paused is not resumed; the row asks for an edit.
Missed runs documented in docs/subsystems/core-host.md from DSH's own behavior (one run for the latest missed time per recurring task; a passed one-time task runs once on start), with a test against the pinned dsh-schedule.
Activity
Birfy commentedon Oct 19, 2026
Triage on main
7b9e90b, 2026-10-19 ~12:10 Asia/Shanghai: needs-human, not agent-ready. Depends on #353 (phase 1) and needs an owner go-ahead and scope (where scheduled tasks live, who may create them).Birfy commentedon Oct 20, 2026
Triage (maintenance, 2026-10-20 08:04 Asia/Shanghai)
Checked on main
a45fc8c.Already on main (most of the core)
core/src/host/schedules.js,core/src/client/schedules.js): Settings → Scheduled tasks, a Bot's card and its details line. Once / every day / every week / repeat every N minutes, cron shown when present, timezone shown when it differs from local, Next: time, delete with a click-again confirm. Targets a Bot's chat or a group chat. Tasks follow a Bot to a fresh part of its chat. Automation tasks are on by default (Switch on DSH Automation tasks by default, once per profile; the hint opens Plugins #381).turn-origin.js,scheduledverdict), and it goes through the normal approvals.Expected behavior
From Settings → Scheduled tasks I can edit or pause a task without deleting it. Each task shows its last run and whether it failed. The docs say what happens to a run missed while the app was closed (at most one catch-up run, never many).
First slice (smallest shippable step)
moveSchedules, so a failure keeps the old task.docs/subsystems/core-host.mdwith a test.core/test/schedules*.test.js.Details I decided (say if you disagree)
Question for the owner
Which gap first: (a) Edit + Pause/Resume + documented missed runs; (b) last run and failed runs shown (needs #353/#349 first); or (c) treat #354 as done by the current Scheduled tasks, close it, and file the gaps as small issues?
Recommendation: (a).
Birfy commentedon Oct 20, 2026
Owner decision (2026-10-20): Confirmed option (a): next, add edit and pause/resume for scheduled tasks, then document what happens to a missed run while the app is closed (at most one catch-up run).
Birfy commentedon Oct 20, 2026
Claimed by maintenance run (2026-10-20 08:55 Asia/Shanghai), branch
feat/354-schedule-edit-pauseon Birfy/FlyBot, following the Owner decision above.Birfy commentedon Oct 20, 2026
Minor decisions made while implementing the first slice (PR #474, 2026-10-20 09:07 Asia/Shanghai):
updatewith the exact listed record). When the task stays on the same chat, Edit uses it, so the task keeps its id, next run and delivery records (useful for the later "last run" slice, Scheduled tasks: last run result, failed runs with retry, and limits (#354 follow-up) #473); the timing is sent only when it changed, so a rename does not move the next run. Create-then-delete (as in the triage) is used when the task moves to another Bot or group chat, or for a finished one-time task DSH cannot update. Either way a failure keeps the old task.pausedSchedules) before DSH deletes it; a failed delete rolls back. Resume recreates it on the Bot's current part; a failed create keeps it paused. A recurring task's next run is computed afresh on Resume (no catch-up for the paused time). A paused task can be edited (stays paused) or deleted. A one-time task whose time passed while paused is not resumed; the row asks for an edit.Edit and pause scheduled tasks; document missed runs (ThinkFlowLab#474)
Birfy commentedon Oct 20, 2026
Cleanup: issue closed. Removing stale agent-working and assignee.