Preface¶
DeepSeek Harness is designed with the philosophy that “everything is a plugin.” When developing agent workflows, you may want to schedule tasks to run during off-peak hours to save costs, or avoid consuming resources during peak periods, requiring manual control over when messages are sent. The dsh-offpeak-job plugin provides automated off-peak scheduling capabilities, queueing messages and automatically executing them when the configured off-peak window conditions are met.
Plugin Overview¶
This plugin is a DeepSeek Harness workflow plugin developed by ganningniang. It allows you to configure peak/off-peak time periods and policies per provider, supports custom run windows (daily/weekday/weekend/cross-day), and controls when tasks run within Composer. The plugin UI is built with TypeScript + React, and state is persisted to $DSH_HOME/offpeak-job/.
Core Features¶
- Provider Configuration: Configure peak/off-peak time periods and approval policies per provider.
- Custom Windows: Supports custom run windows (daily/weekday/weekend/cross-day).
- Policy Control: Supports optional pause policies and night escalation policies.
- Composer Control: Control when tasks run within Composer.
- Waiting Feedback: Displays a waiting bar in the conversation.
- Overview Panel: Sidebar Off-peak overview panel.
- State Storage: State persisted to
$DSH_HOME/offpeak-job/. - UI Tech Stack: TypeScript + React UI.
Installation & Activation¶
To install the plugin, use the official installation command. After installation, the DSH web process must be restarted to apply the configuration.
dsh plugin --profile web add "https://github.com/ganningniang/dsh-offpeak-job/releases/latest/download/dsh-offpeak-job.tgz"
After installation is complete, restart the DSH web process and refresh the frontend interface.
Typical Usage¶
- Configure Provider: Go to provider settings, enable Peak / off-peak, configure windows and approval policies, and save.
- Send Messages: Select “Off-peak run” in Composer to send messages; messages will enter the waiting queue.
- Run Immediately: Use the “Start now” button to immediately run queued tasks.
- Check Status: View all queued tasks via the sidebar Off-peak overview panel.
Notes¶
- Host State: The host must remain running during off-peak hours; otherwise, queued tasks will not execute automatically.
- Checkpoint Mechanism: Pause and resume are not precise tool checkpoints, but rather task continuation.
- Default Policy: The default night escalation policy is “Reject and Continue.”
- Chat Limitations: Only Off-peak run chats follow calendar and off-peak approval policies; Run now is unaffected.
- Recovery Mechanism: When sending a new message, if a pending recovery is waiting, it must be completed or discarded first.
- Privacy: No telemetry data; configuration and waiting queues are stored locally.
Summary¶
This plugin solves the problem of automatically controlling task execution timing in DSH, making it suitable for scenarios where tasks need to be executed during specific time periods to control costs or resources. Both configuration and state are stored locally, with no network reporting involved.
Project Links¶
- GitHub: https://github.com/ganningniang/dsh-offpeak-job
- Directory: https://www.skillhub.cn/plugins/ganningniang/dsh-offpeak-job