Skip to content

[Bug]: Past one-time Cron schedules are accepted and executed immediately #1516

Description

@soyuzo

OpenSquilla version or commit

0.5.4

Area

CLI

Reproduction steps

Use a static reminder with no external delivery:

opensquilla cron add `
  --name "QA past at" `
  --text "QA past reminder" `
  --at 2020-01-01T00:00:00Z `
  --no-deliver `
  --json

The command returns success and a job with next_run in 2020. Within the next scheduler tick, the job executes, creates an isolated Cron session, and is removed from the active job list.

The equivalent Web UI flow is Automation -> Add -> Run once at a specified time -> select a past date -> Static Reminder -> Save.

Expected behavior

Reject a past one-time timestamp with a validation error before saving. If catch-up execution is an intentional feature, require an explicit opt-in and clearly warn that the payload will run immediately.

Actual behavior

  • CLI exits 0 and persists the expired timestamp.
  • The scheduler immediately executes the payload.
  • Web UI shows Schedule created, then immediately shows the reminder.
  • The one-shot job disappears after execution.

Environment

windows 11

Diagnostic bundle and error reference

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghas-linked-prAn open pull request is linked to this issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions