You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Design] Task scheduling system — internal scheduler vs external scheduler gateway #14
In v0.14.0, we added a complete task scheduling system with six schedule types (once, interval, cron, daily, weekly, monthly). A key design decision was supporting both internal and external schedulers.
Dual-Mode Design
Internal Scheduler (InternalScheduler)
Built-in asyncio-based scheduler for standalone deployments
Configurable poll interval, max concurrent tasks, task timeout, user filtering
Lifecycle management: start, stop, pause, resume
Auto-generates admin JWT for API access
Best for: single-node deployments, development, simple production setups
CLI: apflow scheduler start/stop/status/trigger
External Scheduler Gateway (WebhookGateway)
HTTP webhook integration for enterprise schedulers
HMAC signature validation, IP filtering, rate limiting
Helper functions for generating cron entries and Kubernetes CronJob manifests
Best for: Kubernetes deployments, existing scheduler infrastructure (cron, Temporal, APScheduler)
REST endpoint: POST /webhook/trigger/{task_id}
JSON-RPC: tasks.webhook.trigger
Calendar Integration (ICalExporter)
Export scheduled tasks as iCalendar format
RRULE support for recurring events
Subscribe in Google Calendar, Outlook, etc.
API: tasks.scheduled.export-ical
CLI: apflow scheduler export-ical
Why Both?
Small teams want zero-config scheduling (internal). Enterprise teams already have Kubernetes CronJobs or Temporal (external gateway). Supporting both means apflow fits into any deployment model without forcing infrastructure decisions.
Activity
tercel commentedon Feb 20, 2026
Archived: This issue documents a past design decision for reference.
fix: bridge module registration and validation gaps (CRITICAL #9-#14)