Skip to content

feat: cron-style scheduler for recurring user-defined tasks #114

@sentry-junior

Description

@sentry-junior

Summary

Users want to register a natural-language prompt and have Junior execute it on a recurring schedule (e.g. weekly, daily), posting results back to the originating Slack channel. This is currently impossible: Junior has no persistence layer for scheduled intent.

Current behavior

Junior responds to in-thread invocations only. There is no mechanism to re-invoke a task without a human trigger. Workarounds require external tooling (GitHub Actions, cron servers) set up by the user.

Gap

A meaningful class of tasks—recurring repo scans, digest posts, drift checks—requires autonomous re-execution. Without a scheduler, Junior cannot own these loops and users must cobble together external triggers.

Options

Option A — External trigger via GitHub Actions (short-term)

  • A schedule: workflow in a repo calls the Junior API (or a Slack webhook) on the desired cadence.
  • Pro: zero infrastructure changes to Junior, ships fast.
  • Con: requires repo access per user; poor UX; doesn't feel native.

Option B — Junior-managed cron table (recommended)

  • Add a persistent schedules store (task prompt, cron expression, channel, creator, last-run timestamp).
  • On registration, validate the prompt against Junior's skill set so only executable tasks can be scheduled.
  • A scheduler process polls the table and fires tasks at the right time, executing them in the context of the registered channel.
  • Slack UX: @junior schedule weekly: scan getsentry/sentry-for-ai for [skill-drift] issues and post a summary here
  • Confirmation receipt with next-run time; cancellation with @junior unschedule <id>.
  • Pro: native, discoverable, auditable.
  • Con: requires infra work (persistent store, scheduler worker, de-dup/idempotency).

Option C — Slack Workflow Builder integration

  • Expose Junior as a Workflow Builder step; users configure cadence in native Slack UI.
  • Pro: leverages existing Slack scheduling primitives.
  • Con: limited expressiveness; depends on Slack platform capabilities per workspace tier.

Recommendation

Option B. Implement a lightweight schedules table (postgres or redis-backed) with a worker that resolves due tasks and re-invokes the normal Junior execution pipeline. Scope V1 to simple interval expressions (daily/weekly/monthly at a given time) before adding full cron syntax. Slack surface: registration and cancellation via natural-language commands in any channel.

Action taken on behalf of Daniel Griesser.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions