Task Status Skill
Use these scripts to keep users informed and prevent silent finishes.
0) One-time default config
Persist your default target/channel once:
python scripts/configure_status.py --target YOUR_CHAT_ID --channel telegram --test
After this, other scripts can omit --target.
1) Guaranteed start/end callbacks (recommended)
Run long commands via run_with_status.py so completion is always reported.
python scripts/run_with_status.py \
--task "windows-cursor-check" \
--channel telegram \
-- bash -lc "sleep 2 && echo done"
- Sends one
progressmessage before command execution. - Sends
successorerrorwhen command exits. - Includes elapsed time in final status.
2) One-off manual status messages
python scripts/send_status.py "开始执行" progress setup
python scripts/send_status.py "执行完成" success setup
python scripts/send_status.py "执行失败" error setup
If you do not want persisted config, pass --target each time.
3) Periodic monitor for very long tasks
python scripts/monitor_task.py start data-sync --interval 300
python scripts/monitor_task.py status
python scripts/monitor_task.py stop data-sync --final-status success --final-message "同步完成"
startlaunches a detached background runner.stopalways sends one final status update.cancel_allclears all active monitors.
Status types
progress: ongoing worksuccess: completederror: failedwarning: completed with risk/partial issues
Troubleshooting
- Missing target: run
configure_status.pyor pass--target. - No message sent: test with
--dry-runfirst. - Stale monitor: run
python scripts/monitor_task.py cancel_all.