Skip to content

Enabling a disabled task that has passed its execution time causes it to run immediately #383

@tcosta84

Description

@tcosta84

I realized that when I enable a disabled task that has already passed its execution time, it is execute immediately.
Is that the expected behaviour?

I expected it wouldn't run automatically.
I'd like to use this enable/disable option as a a pause/play feature.

  • Celery Version: 4.4.2
  • Celery-Beat Version: 1.5.0

Exact steps to reproduce the issue:

  1. Create a task to run at a given time (eg: 5pm);
  2. Disable it;
  3. Minutes later, enable it;
  4. The task should run immediately.

How can I avoid the task to run automatically.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions