# dsh-schedule-command English | [中文](README.md) A human-friendly `/schedule` slash command for [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness). Create and manage session-local scheduled tasks in natural language, and let the session run them automatically on schedule. - 🗣️ **Natural-language creation**: `/schedule 每 10 分钟,监控当前机器的运行情况并进行分析总结` - ⏰ **Session identification**: sessions with active tasks get a `⏰` title prefix, visible at a glance in the sidebar - 🔄 **One-shot + recurring**: supports delay (`after`), absolute time (`at`), and fixed interval (`every`) - 🧩 **Zero extra setup**: installing this plugin also mounts the `@deepseek-ai/dsh-schedule` runtime automatically ## Installation ```bash # From GitHub dsh plugin --profile web add github:piaohua/dsh-schedule-command # Or from a local directory (development) dsh plugin --profile web add /path/to/dsh-schedule-command ``` After installation, `dsh plugin` automatically adds the plugin to the profile's bundle stack. **Restart DSH to activate.** > **Note**: Installing this plugin also mounts the `@deepseek-ai/dsh-schedule` runtime (a dsh-core capability that no shipped bundle mounts by default). Without that runtime, `/schedule` only writes inert log records and reminders never fire. ## Usage ### Create scheduled tasks ``` /schedule 30分钟后提醒我喝水 /schedule 每天早上9点生成项目晨报 /schedule in 2 hours check build status /schedule tomorrow 3pm review PR comments /schedule every 2 hours check disk usage /schedule 每个工作日上午9:00,为这个项目生成一份简明的晨间简报 ``` ### Manage scheduled tasks ``` /schedule list # List all active scheduled tasks /schedule delete schedule-1 # Delete a specific task /schedule clear # Delete all tasks /schedule # Show help message ``` ## Supported time formats | Pattern | Example | Mapped rule | |---------|---------|-------------| | X minutes/hours/seconds later | `30分钟后提醒我` | `after_seconds` | | in X minutes/hours | `in 2 hours check status` | `after_seconds` | | every X minutes/hours/days | `每2小时检查一次` | `every_seconds` | | every X minutes/hours/days (EN) | `every 30 minutes sync` | `every_seconds` | | daily/hourly | `每天生成报告` | `every_seconds: 86400` | | tomorrow/today HH:MM | `明天下午3点开会` | `at` (absolute time) | | tomorrow/today HH:MM (EN) | `tomorrow 9am standup` | `at` (absolute time) | | weekdays | `每个工作日9:00晨报` | `every_seconds: 86400` + weekday constraint note | > **Note**: The underlying `dsh-schedule` v1 only supports fixed intervals (`every_seconds`), not Cron expressions. Calendar rules like "weekdays" degrade to 24-hour intervals with a constraint annotation in the prompt, letting the model decide whether to skip at execution time. ## Session identification Sessions with active scheduled tasks automatically get a `⏰` title prefix. When you create a task in a brand-new session, the plugin also generates a title like `⏰ 定时任务:监控当前机器的运行情况…` and opens a real conversation turn, so the session has content, a title, and stays visible in the workspace: ``` ⏰ 定时任务:监控当前机器的运行情况并进行分析总结。 ``` The prefix is removed automatically when all tasks are cleared, and restored again when tasks are recreated. ## Cross-platform wake recommendations Scheduled tasks only fire on time while the session is live. If the computer sleeps, tasks become overdue and are delivered upon resume (recurring tasks deliver only the latest missed occurrence). | Platform | Recommendation | |----------|---------------| | **Linux** | Servers typically don't sleep — no extra config needed | | **macOS** | Use `sudo pmset schedule wake "MM/DD/YYYY HH:MM:SS"` to schedule wake-ups | | **Windows** | Enable "Wake the computer to run this task" in Task Scheduler | ## Known limitations - **Session-local delivery only**: Reminders only fire while the original session is live; cold sessions receive no external notification - **Fixed intervals**: No Cron expressions or complex calendar rules - **Latest-only catch-up**: Overdue recurring tasks deliver only the latest occurrence, not missed backlog - **Regex-based parsing**: Complex natural language may degrade to default rules ## Development ```bash pnpm install pnpm build # Compile TypeScript → lib/ pnpm clean # Clean build artifacts ``` ## License MIT