Skip to content

Prevent new jobs running if job still in progress #1296

@andyslack

Description

@andyslack

Is there an existing issue that is already proposing this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe it

The problem here is long running crons which take longer than the recurring time, for example, if I have a cron which runs every 60 seconds, but during high loads it takes 100 seconds to complete, multiple jobs will run, leading to higher load on our services/database etc.

Describe the solution you'd like

I would love a flag/options in the options object to pass something like waitUntilFinished boolean which if passed and true it will not run the same job while an existing one is still running.

Teachability, documentation, adoption, migration strategy

As above.

What is the motivation / use case for changing the behavior?

Reducing load on application with multiple same jobs running.

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