Introduction¶
In DSH’s plugin-based usage, scheduled tasks usually have two specific requirements: one is to automatically execute a written prompt based on a cron cycle instead of manually triggering it from the page every time; the other is that the execution process should ideally take place within a real agent session, preserving session or project context.
dsh-timer-agent is a DSH Web GUI plugin, providing a host-resident timer engine: the dsh web service starts to take effect immediately, and the browser GUI can be closed without preventing triggering. Below is an introduction to its functions, installation methods, and limitations to note.
What is it¶
dsh-timer-agent is maintained by LouisHaoL with an MIT license. It consolidates 5-segment cron scheduling, real agent session execution, the model tool timer_agent, and the Web GUI task panel into a single plugin. It is used to complete “unattended tasks” that automatically execute a prompt on schedule and can also run commands directly on schedule.
Core Features¶
Scheduling¶
- Supports 5-segment cron: minute, hour, day, month, weekday.
- Supports
*,*/n,a-b, comma lists. - Provides cron preset dropdowns: Daily 09:00, Hourly, Every 10 minutes, Monday 09:00.
Target Selection¶
- Specify an existing session: every trigger continues that conversation; selecting a session pins that conversation.
- Specify project workdir: create and run a new session within that project.
- Leave both empty: create a new session in the default workspace to start a new conversation.
- The target tree selector groups by project, is collapsible, and allows selecting existing sessions or creating new sessions.
Management Interface¶
- A “Scheduled Tasks” entry appears in the Web GUI sidebar; the task panel provides a list, search/filter, and details page.
- The details page supports cron editing, execution history, jumping to session transcript, immediate execution, reset, and delete.
- In the conversation, you can manage tasks via the
timer_agentmodel tool; actions includecreate/list/update/pause/resume/archive/restart/remove/run. - The plugin registers a
plugin:timer-agentbroadcast segment to inform the agent of this plugin’s capabilities and collaboration methods.
Regular Command Tasks¶
In addition to AI Agent tasks, it also supports regular tasks (commands): spawning commands + parameters directly on schedule. Optional work directory and timeout, no AI involved, no quota consumption. The stdout / stderr tail (≤16k characters) and exit code are recorded along with execution logs.
Installation and Activation¶
First obtain the plugin directory, then install using the local absolute path:
dsh plugin --profile web add link:<local absolute path of this directory>
After installation, restart dsh web. A “Scheduled Tasks” entry in the sidebar indicates it is active.
Typical Usage¶
Creating an AI Agent Scheduled Task¶
-
Call the
timer_agenttool in a DSH conversation and use thecreateaction to create the task. -
Fill in the 5-segment cron, for example:
0 9 * * *
The prompt must be self-contained and cannot rely on on-the-spot questioning.
-
Select the target: existing session, project workdir, or leave both empty to use the default workspace.
-
After saving, wait for the scheduled trigger, or use “Immediate Execution” in the task details page.
Creating a Regular Command Scheduled Task¶
-
Use
timer_agentor the Web GUI to create a regular task (command). -
Fill in command + parameters, specify work directory and timeout if necessary.
-
Upon triggering, the execution record will retain the
stdout/stderrtail (≤16k characters) and exit code.
Applicable Scenarios and Notes¶
dsh-timer-agent is suitable for use in controlled local or private environments. It is suitable for scheduling self-contained prompts to be executed by agent sessions, as well as for running scripts you have reviewed on a schedule.
Before use, please check the source code and license. This plugin’s regular tasks execute arbitrary commands on your machine with the current user’s permissions, with no sandbox or whitelist. API routes are loopback + same-origin accessible, but you still need to note the following limitations:
- Anyone who can create/edit tasks, agent sessions that can call the
timer_agenttool, and local processes that can access the loopback API can potentially cause arbitrary programs to run on a schedule. - The task ledger
~/.dsh/timer-agent/jobs.jsoncan be tampered with, which is equivalent to arbitrary code execution on the local machine; use with caution. - Do not expose this plugin to untrusted environments.
- Scheduled execution depends on the
dsh webservice process being alive; if the service stops, it will not trigger, and after restart, it will only run tasks that have been deferred to their due time, missing tasks are skipped. - During task execution, if the scheduled time is missed, the current run is skipped and waits for the next cron match point.
- AI Agent task execution consumes API quotas; since there is no human presence during scheduled execution, the prompt must be self-contained and cannot ask questions.
Conclusion¶
The value of dsh-timer-agent lies in transforming DSH’s scheduled execution from page operations into a host-resident engine, and allowing the agent to directly create and manage the same batch of tasks within the conversation. License is MIT.
GitHub Repository: https://github.com/LouisHaoL/dsh-timer-agent
The community directory is an independent site with no official affiliation to DeepSeek / Hypi; this article does not include unverified directory page URLs.