Skip to content

F5: Recurring tasks / routines with cron scheduling#23

Merged
obaid merged 2 commits intomainfrom
feature/routines
Apr 9, 2026
Merged

F5: Recurring tasks / routines with cron scheduling#23
obaid merged 2 commits intomainfrom
feature/routines

Conversation

@obaid
Copy link
Copy Markdown
Contributor

@obaid obaid commented Apr 9, 2026

Summary

  • New routines table with cron expressions, timezone, active/paused status
  • New routine_id foreign key on tasks table for traceability
  • ProcessRoutinesJob runs every minute via Laravel scheduler, creates tasks for due routines
  • Guards against duplicate task creation (skips if pending task exists)
  • Per-team limit of 50 active routines
  • Full CRUD controller with toggle active/paused
  • Frontend page with cron presets, custom input, timezone selector

Test plan

  • Create routine with "every Monday at 9am" → verify next_run_at computed
  • Wait for ProcessRoutinesJob → verify task auto-created with TSK-{n} identifier
  • Pause routine → verify no new tasks created
  • Resume routine → verify next_run_at recomputed
  • Verify 50-routine limit enforced
  • Run migrations on prod

obaid added 2 commits April 8, 2026 16:54
Introduces database-backed routines with cron expressions that
automatically create governance tasks for agents. Includes Routine
model, ProcessRoutinesJob (runs every minute), CRUD controller with
Inertia frontend, and per-team limit of 50 active routines.
Tests cover CRUD operations (create, toggle, delete), cron expression
handling, cross-team agent validation, and ProcessRoutinesJob behavior
including task creation, paused routine skipping, duplicate prevention,
and next_run_at advancement.
@obaid obaid merged commit d7cad9c into main Apr 9, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant