Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

bug: Imperative schedules created without declarative tasks are invisible in the UI but block deployment #3209

Copy link
Copy link
@isshaddad

Description

@isshaddad
Issue body actions

Provide environment information

n/a

Describe the bug

Schedules created imperatively via schedules.create() don't appear in the Schedules tab when there is no current successful deployment for that environment. They still count against the schedule limit and keep firing runs, but there is no way to view or delete them from the dashboard. This creates a deadlock: the schedules block deployment, and the failed deployment hides the schedules.

Reproduction repo

n/a

To reproduce

  1. Create 10 scheduled tasks and deploy successfully (declarative schedules are auto-created on deploy)
  2. Remove all 10 tasks from code and redeploym, schedules are cleared
  3. Imperatively create 10 schedules via schedules.create() using a unique deduplicationKey each time (simulating CI runs without a stable key):
await schedules.create({
task: "scheduled-task-1",
cron: "* * * * *",
deduplicationKey: `ci-run-${Date.now()}`,
});
// repeat for 10 tasks
  1. Go to the Schedules tab → shows 0 schedules despite 10 existing in the DB
  2. Try to deploy the 10 scheduled tasks again → fails with You have created 10/10 schedules

Additional information

Workaround: Use a stable deduplicationKey in CI so repeated runs upsert instead of creating new schedules. If you're already over the limit, you can clean up with a loop: call schedules.list() and then schedules.del() for each returned schedule (e.g. from a one-off script or task).

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    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

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.