tools / tasks.py

Cron + interval background-job scheduling via APScheduler.

Tool: manage_tasks

ActionArgsBehaviour
createtask_name, cron_expression, promptAdd a job: "0 9 * * *"CronTrigger.from_crontab(); "interval:60"add_job(..., 'interval', seconds=60).
listReturns all active jobs.
stoptask_identifierRemove a single job by id.
stop_allWipe all scheduled jobs.

The job body is the prompt that will be re-injected into the agent on the trigger schedule. APScheduler is bound to the FastAPI lifespan and shut down with wait=False so server restart doesn't block on long-running jobs.