DeepSeek Harness (DSH) supports running agents locally. However, in actual use, immediate responses are not always required; users may instead want to take advantage of system idle periods to process tasks in batches. The leisure-time-queue plugin uses a queue mechanism to allow users to configure tasks in advance and specify weekly execution time slots. Tasks are scheduled automatically when the required conditions are met.
Installation¶
This plugin is maintained by fireworksss. Before installing it, make sure your DeepSeek Harness CLI version is @deepseek-ai/dsh@0.1.5-rc.1 or higher.
The installation command is as follows:
npx @deepseek-ai/dsh plugin --profile web add "$plugin_package"
After installation, you must stop and restart DeepSeek Harness. The plugin does not automatically reload while the system is running. After updating or uninstalling the plugin, a restart is also required.
Core Features¶
- Time configuration: Configure weekly execution time slots in the plugin interface. You can set multiple different time slots.
- Session management: When creating a task, you can choose an existing session or create a new one (with support for configuring the model, permission presets, and workspace).
- Global entry: The sidebar provides a “Leisure-time Tasks” entry, allowing you to manage queues across all sessions.
- Execution order: Queues are executed in FIFO (first-in, first-out) order.
- Task operations: Supports pause, resume, cancel, retry, edit, delete, and immediate execution.
- Policy override: Supports a global execution policy, as well as defining different time slots for individual sessions.
- Persistence: Supports queue persistence and recovery of dispatched tasks after Harness restarts.
- Local execution: The plugin runs locally and uses the models, credentials, permissions, and workspaces configured in DeepSeek Harness.
Configuration and Usage¶
1. Global Configuration¶
Go to Settings → Plugins → Plugin Configuration → Leisure-time Task Queue.
- Global configuration:
- Enable automatic execution: If disabled, queued tasks will not start automatically according to the configured time slots.
- Time zone: Uses the operating system time zone by default. You can set it manually.
- Weekly time slots: Specify which days of the week and which time ranges are allowed for task startup. Time slots that cross midnight are based on the start day (for example, Monday 22:00 → Tuesday 07:00).
- Concurrency limits: Set the maximum number of concurrent tasks and the daily creation limit.
- Session time slots and task queues: Manage execution policies for specific sessions. You can set separate time zones and time slots for specific sessions to override the global policy.
2. Creating Tasks¶
Click Leisure-time Tasks in the sidebar to open the management page.
- Quick creation from the current session: After opening a session, click Execute during idle time in the session title bar. The plugin automatically uses the current session as the target, reads the content in the input box as the task description, and reuses the current session’s model, credentials, and workspace.
- Create a new task: On the Create Task page, select the task target (an existing session or a new session), fill in the title, task description, and the No earlier than time, then click Create.
Task Execution Mechanism¶
A task in the queue will start only if all of the following conditions are met at the same time:
- The DeepSeek Harness process is still running.
- The plugin’s Enable automatic execution option is turned on.
- The current time falls within the task’s applicable weekly execution time slot.
- The task’s configured No earlier than time has been reached.
- The target session is open and available.
- The Agent in the target session is currently idle.
- The current number of running tasks has not exceeded the maximum concurrent tasks limit.
- The task has reached its turn in FIFO order.
The Immediate execution action ignores only the time-slot restriction. It does not ignore other restrictions, such as session availability, concurrency limits, and so on.
Task Management¶
After adding a task to the queue, you can manage it from the sidebar:
- Pause: Temporarily prevents the task from being scheduled.
- Resume: Returns a paused task to the waiting state.
- Cancel: Cancels a task that is waiting or currently running.
- Retry: Re-adds a failed or canceled task to the queue.
- Edit: Modify the title, task description, or No earlier than time.
- Delete: Remove the task record from the queue.
Notes¶
- Execution conditions: Tasks will not execute automatically. All of the conditions above must be met.
- Runtime environment: The plugin runs locally and depends on the DeepSeek Harness configuration.
- Restart requirement: After installing, updating, or uninstalling the plugin, you must restart Harness. Otherwise, the plugin may be unavailable.
- Background execution: Task execution depends on the DSH process remaining running. If you close the terminal directly or stop the DSH process, the task will not continue running in the background.
References¶
- GitHub repository: https://github.com/fireworksss/LeisureTimeQueue
- Ecosystem directory: https://www.skillhub.cn/plugins/fireworksss/LeisureTimeQueue