Skip to content

Running multiple scheduler commands for different tasks? #36

@Kalyse

Description

@Kalyse

This is going to sound totally whack, but I have intermittent issues with certain command runs failing. It only happens when the stars align, and multiple tasks run under the same scheduler run. I can't figure out the reproduction conditions, but if you imagine I have the hypothetical:

*/5 * * * * task1
*/10 * * * * task2

          • task3
  • 0 * * * task4
    30 0 * * * task5

What ends up happening, is on ten minute intervals task1, task2, task3 will run together, every 10 minutes, (they share the same common demonitor). On half hours, at midnight, task 4+5 will also run...

You get the idea - anyway, what ends up happening is my Unit of Work with Entity Manager is obviously getting screwed up by my own user-space code and it closes the Entity Manager causing weird problems and essentially commands which might end up never being ran.

It's isn't reproducible so I can't exactly nail down how to fix, but what I'd like to do is actually run the scheduler such that I run scheduler:run but instead of grabbing any task ready to run, it is limited to only task1 and task2 for one cron.
Then I might have another scheduler:run which is only going to run task3 and task4.

Is this something that's currently possible? (I have a worry that it might have problems due to the cache lock factory so likely isn't possible).

My thinking is If I could isolate groups of tasks, I am hoping I can figure out which causes the underlying problem. Other ideas and suggestions are also welcome.

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