Feature Request
Problem
There's currently no way to define a service that runs on a schedule (e.g., every N minutes/hours). The existing service modes cover continuous processes (daemon), one-time tasks (task), file watchers (watch), and builds (build), but periodic/scheduled execution requires workarounds like writing a daemon with an internal sleep loop.
Proposal
Add a scheduled service mode (or a schedule field) that accepts a cron expression or interval, allowing services to run periodically as part of azd app run.
Example:
services:
cleanup:
type: process
mode: scheduled
schedule: "0 */6 * * *" # Every 6 hours
command: python scripts/cleanup.py
healthcheck: false
Or with interval shorthand:
services:
sync:
type: process
mode: scheduled
schedule: "every 30m"
command: ./scripts/sync.sh
Use Cases
- Periodic data exports or imports
- Cache warming / invalidation
- Log rotation or cleanup scripts
- Health report generation
- Database maintenance tasks (vacuum, reindex)
- Scheduled backups
Behavior
- Service shows in dashboard with next-run countdown
- Logs from each execution are captured like any other service
- Exit code tracked per execution (success/failure history)
mode: scheduled implies type: process (no port needed)
- Missed schedules during downtime: configurable (skip or run-on-start)
Alternatives Considered
- Daemon with internal loop: Works but pushes scheduling logic into every script
- OS-level cron/Task Scheduler: Outside azd-app's visibility, no dashboard integration, no log aggregation
- Container with cron: Heavy for simple scripts
Feature Request
Problem
There's currently no way to define a service that runs on a schedule (e.g., every N minutes/hours). The existing service modes cover continuous processes (
daemon), one-time tasks (task), file watchers (watch), and builds (build), but periodic/scheduled execution requires workarounds like writing a daemon with an internal sleep loop.Proposal
Add a
scheduledservice mode (or aschedulefield) that accepts a cron expression or interval, allowing services to run periodically as part ofazd app run.Example:
Or with interval shorthand:
Use Cases
Behavior
mode: scheduledimpliestype: process(no port needed)Alternatives Considered