Introduction¶
The DeepSeek Harness (DSH) ecosystem is plugin-based. For automation requirements, scheduled task scheduling is a common scenario. Existing solutions often require writing additional scripts, while the dsh-cron-scheduler plugin introduces standard Linux crontab syntax, allowing the LLM to manage schedules directly within the conversation.
What Is This?¶
This is a workflow plugin maintained by AlexZhou19871030. It allows the LLM to create scheduled tasks using cron expressions, supporting prompt delivery or invoking existing workflows. Tasks are bound to sessions and use session event logs for persistence; after the host restarts, scheduling resumes automatically.
Core Features¶
- Standard Cron Syntax: Supports 5-field and 6-field expressions (including seconds), as well as steps (
*/15), ranges (9-18), lists (1,5,10), and month/weekday names (JAN-DEC). - Semantic Consistency: Consistent with Linux crontab. When both day and weekday are specified, they are processed with OR logic; 5-field expressions trigger at the exact minute; missed triggers are not replayed.
- Full Lifecycle Management: Provides tools for creating, listing, deleting, pausing, resuming, previewing, and manually triggering tasks.
- Proactive Task Suggestions: The LLM can infer recurring or reminder intent from chat history, generate pending suggestions, and automatically schedule them after the owner confirms.
- Session-Level Persistence: Scheduling state is bound to session logs and restored automatically after restart.
Installation and Enabling¶
It is recommended to search for dsh-cron-scheduler in the DSH Plugin Center to install it. If manual configuration is required, add the following to the dependencies in package.json:
"dsh-cron-scheduler": "^0.1.0"
Run pnpm install in the profile directory, then restart DSH Host.
Usage¶
After the plugin is loaded, its cron tool is automatically mounted to every root agent. Core tools include:
* cron_create: Create a task. It requires specifying cron and kind (prompt or workflow).
* cron_list: List tasks in the current session, sorted by next trigger time, and display pending proactive task suggestions.
* cron_next: Read-only preview; calculates the next N trigger times.
* cron_delete / cron_pause / cron_resume: Manage task status.
* cron_run: Manually trigger a task once immediately.
* cron_suggest / cron_accept / cron_reject: Used for the proactive task flow.
Example: Creating a prompt task¶
Create a task that delivers a prompt every day at 09:00:
请创建定时任务:每天 09:00 投递提示词「早上好,请总结昨日进展」,cron 表达式为 0 9 * * *,kind 为 prompt。
Example: Creating a workflow task¶
Create a task that invokes the daily_report workflow from Monday to Friday at 18:00:
请创建定时任务:每周一至周五 18:00 调用工作流 daily_report,cron 表达式为 0 18 * * 1-5,kind 为 workflow,参数 { scope: "today" }。
Example: Previewing trigger times¶
Preview the next 5 trigger times for a specific cron expression:
请用 cron_next 预览 0 18 * * 1-5 未来 5 次的触发时间。
Proactive Task Flow¶
When recurring or reminder intent appears in the conversation, the LLM first calls cron_suggest to generate a pending suggestion (suggestion IDs are named cron_s_...). At this point, the task is not actually scheduled, and delivery will not be triggered until the suggestion is confirmed. After the owner replies with approval, the LLM calls cron_accept to convert the suggestion into a real task and calculate the first trigger time.
Notes¶
- Specific peer dependency version requirements must be met (such as
@deepseek-ai/cordis,@deepseek-ai/dsh-agent). - When both day and weekday are specified, they are processed with OR logic.
- Missed triggers are not replayed.
- It is recommended to review the source code and license before installing.
Summary¶
This plugin provides DSH with standardized scheduled task scheduling capabilities. Combined with the reasoning abilities of LLMs, it enables automated recurring reminders and report generation.