Skip to content

Duplicate runs using default cache lock #226

@dom-devel

Description

@dom-devel

What's the issue

We're having some issues where two crons end up running at the same time.

We're using the cache lock (i.e. default) and version: ==0.5.1

It seems like there was an update to the FILE_LOCK cache Simplifies the file-based lock mechanism and fixes the race condition, but none as far as I could see to the cache lock.

Is this a known issue?

Details
We've got a cron job which runs every 10 minutes.

RUN_EVERY_MINS = 10
schedule = Schedule(run_every_mins=RUN_EVERY_MINS)

Which is then called by our cron runner every 10 minutes.

*/10 * * * *

This seems to work out at the cron running about 3-4 times an hour. I'd guess there is some sort of time mismatch?

image

This wouldn't be the end of the world, except occasionally it does this and triggers the cron twice approximately 1 minute apart:

image

And when this happens, it seems that the cron seems to run simultaneously despite not having parallel runs enabled.

image

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