Cron via scheduler
Create a Veirox task that fires on a cron schedule โ no external cron daemon needed. The Veirox scheduler fires the task, creates a session, and handles retries.
Prerequisites
- CLI authenticated with
tasks:writescope. - A prompt string or file describing what the agent should do.
Steps
# Create a task that fires every day at 09:00 UTC veirox task new --name "morning-health-check" --prompt "Check all services are healthy. Report any anomalies." --cron "0 9 * * *" --enabled
Verify and test:
veirox task list --enabled veirox task info <task-id> veirox task run <task-id> --wait # fire immediately to test
Common pitfalls
- Timezone: cron expressions are evaluated in UTC. Add a note in the prompt if the agent needs to reason about local time.
- Concurrent runs: if a previous run is still active when the next cron fires, the scheduler skips the new trigger. Design prompts to be idempotent.
See also
- ๐ Reference: veirox task
- ๐ Concept: Sessions
- ๐งโ๐ณ Recipe: Trigger task from CI