mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-31 19:45:15 +02:00
feat(automation): register agent_task action and schedule/manual triggers
This commit is contained in:
parent
56b3e1bfc4
commit
99fd1a1338
5 changed files with 71 additions and 0 deletions
|
|
@ -0,0 +1,21 @@
|
|||
"""Built-in ``schedule`` trigger. Self-registers at import time."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from app.automations.schemas.triggers import ScheduleTriggerParams
|
||||
|
||||
from .store import register_trigger
|
||||
from .types import TriggerDefinition
|
||||
|
||||
SCHEDULE_TRIGGER = TriggerDefinition(
|
||||
type="schedule",
|
||||
description="Fire on a cron schedule in a given timezone.",
|
||||
params_schema=ScheduleTriggerParams.model_json_schema(),
|
||||
payload_schema={
|
||||
"type": "object",
|
||||
"additionalProperties": False,
|
||||
"properties": {},
|
||||
},
|
||||
)
|
||||
|
||||
register_trigger(SCHEDULE_TRIGGER)
|
||||
Loading…
Add table
Add a link
Reference in a new issue