Summary
daemon manages long-running services but not scheduled or recurring tasks. Adding task scheduling makes daemon a single tool for all background workloads.
Proposed Solution
Add a tasks section to the daemon config:
tasks:
daily-backup:
command: "bash scripts/backup.sh"
schedule: "0 2 * * *"
timeout: 600
on_failure: retry
retry:
max_attempts: 3
delay: 60
The scheduler checks every minute whether any task is due. On trigger: spawn the command as a child process, capture stdout/stderr to a task log file, record execution start time, end time, exit code, and status.
daemon tasks list shows all tasks with next scheduled run time. Dashboard "Tasks" tab shows last run result and a "Run Now" button for manual trigger.
Acceptance Criteria
Summary
daemon manages long-running services but not scheduled or recurring tasks. Adding task scheduling makes daemon a single tool for all background workloads.
Proposed Solution
Add a
taskssection to the daemon config:The scheduler checks every minute whether any task is due. On trigger: spawn the command as a child process, capture stdout/stderr to a task log file, record execution start time, end time, exit code, and status.
daemon tasks listshows all tasks with next scheduled run time. Dashboard "Tasks" tab shows last run result and a "Run Now" button for manual trigger.Acceptance Criteria
daemon tasks listshows all tasks with their next run time.retryconfigured are retried the specified number of times.