Preface¶
The ecosystem philosophy of DeepSeek Harness (DSH) is “everything is a plugin.” In local development or deployment scenarios, developers often need to execute tasks on a schedule. Existing approaches often rely on OS-level cron or require separately maintaining child processes and credentials, while DSH’s built-in schedule_create is mainly used for in-session reminders and cannot satisfy unattended execution across sessions.
dsh-wb-cron is a plugin designed for this scenario. It integrates the scheduler into the web profile process and automatically launches a new root agent at the scheduled time to execute the instructions.
Features¶
- Three scheduling modes: Supports Vixie-standard 5-field cron expressions (with step values, ranges, lists, names, and IANA time zones), fixed intervals (minimum interval ≥5 minutes), and one-time absolute times.
- Conversational and GUI management: Provides tools such as
cron_create/cron_list/cron_update/cron_delete/cron_run_now/cron_next/cron_history, and also offers a two-level GUI (sidebar quick overview and a settings page for full management). - In-process execution: Tasks launch a root agent inside the host process, without child processes, and naturally inherit the host profile’s model routing, memory injection (dsh-wb-memory), skills, and hooks.
- Zero dependencies and zero telemetry: It has no npm runtime dependencies, sends no statistics or heartbeats to any external address, and network behavior during task instruction execution is determined solely by the Agent.
- Agent preset management: Each task can independently pin a preset (such as standard / ptc / minimal). If the preset is unavailable, it executes according to the three-level fallback strategy and records an error.
- Session persistence and continuation: Sessions generated by execution are persisted normally and can be continued via the Web sidebar or history records.
Installation and Enabling¶
Plugin installation requires two steps: first install it via the DSH CLI, then manually modify the configuration file.
dsh plugin --profile web add dsh-wb-cron
After installation, edit the host configuration file ~/.dsh/profiles/web/package.json and append "dsh-wb-cron" to the dsh.profile.bundles array. Restart the host for the changes to take effect.
Core Mechanisms¶
- Scheduler lifecycle: The scheduler runs inside the host process. If the host is not running or is in a headless profile, the scheduler does not start. After the host starts, the scheduler periodically checks trigger conditions in the background.
- Missed-run handling: When a task’s trigger time has passed and the scheduler finds that
nextFireis more than 2 minutes overdue, it choosesskip(default, recorded as skipped-missed) orrunOnce(run it once immediately) according to the configuration. In either case, at most one catch-up run is performed; backlog is never replayed. - Stopping and timeout: When a user requests stopping a task, the scheduler sets a cancellation flag and attempts to call the agent’s
stop/abort/disposemethods. Because the agent does not yet have a public stop interface, stopping may only release resources; the task may continue to completion in the background, but the session is still persisted normally. - Division of responsibilities with the built-in scheduler:
| Feature |schedule_create(built-in) |cron_create(this plugin) |
|—|—|—|
| Trigger scenario | In-session reminder | Unattended execution across sessions |
| After session closes | Reminders remain overdue until the session returns | Triggers as usual; the session is persisted and can be continued |
Agent Preset Fallback Strategy¶
Tasks are unattended, so execution should not be interrupted when a preset is unavailable. The plugin uses a three-level fallback chain and records the reason in the error field of the run history:
- Level 0: Try the task’s pinned
preset. If this fails, recordpreset X is unavailable, falling back…. - Level 1: Try the built-in standard mode
standard. If this fails, recordstandard is also unavailable, falling back to global default…. - Level 2: Try the global default preset (
agentPresets.resolve(undefined)). If this fails, recordno preset is available; running with bare context. - Level 3: Use bare context (
metawithoutagentPreset). Throw an error upward only if execution itself fails.
Configuration Options¶
The following parameters can be adjusted by modifying cordis.patch.yml or the configuration file:
{
"maxConcurrentJobs": 1, // 全局并发上限,默认串行
"tickMs": 30000, // 调度检查间隔(毫秒)
"historyLimit": 500, // history.jsonl 保留条数
"defaultTimeoutMinutes": 30, // 单次运行看门狗超时
"appendMemoryLogDefault": true // 任务头默认是否带 wb-memory 收尾指引
}
Applicable Scenarios and Notes¶
- Permission review: Installing any DSH plugin means running third-party code with your permissions. This plugin’s source code structure includes entry, scheduling and parsing, storage, execution, and front-end modules; please review it yourself.
- Data storage: Task data and history are stored in the
~/.dsh/wb-cron/directory (jobs.jsonandhistory.jsonl). - Ecosystem context: This plugin is listed in the community directory (SkillHub) and has no official affiliation with DeepSeek or High-Flyer.
Conclusion¶
dsh-wb-cron provides a practical solution for implementing unattended scheduled tasks within the DSH ecosystem. Through in-process execution and a robust fallback strategy, it ensures the stability and controllability of task triggering.
- Repository: https://github.com/miseryrua/dsh-wb-cron
- Directory: https://www.skillhub.cn/plugins/miseryrua/dsh-wb-cron