Delegate task across containers in galaxy

Hello, I’m building an application that runs some tasks in a cron job every 10 minutes, the important question is if I use Galaxy and create 2 containers that task will be run in both instances, how can I avoid that from happening?

Help is appreciated

1 Like

Check for job/task queue manager for node.

1 Like

You can get some inspiration from here or perhaps a more recent similar package may exist in Atmosphere: GitHub - percolatestudio/meteor-synced-cron: A simple cron system for Meteor. It supports syncronizing jobs between multiple processes.

This is an updated version of synced-cron that is compatible with Meteor 3: GitHub - quavedev/meteor-synced-cron: A simple cron system for Meteor. It supports syncronizing jobs between multiple processes.

1 Like

Hi @rcastellanos!

Have you checked this doc: Background jobs | Galaxy Docs ?
I hope this can help you!

Regards

Use redis with bullmq and implement a simple redlock algorithm (cf. https://redis.io/docs/manual/patterns/distributed-locks/)

Edit: Actually it should be enough to use bullmq’s repeatable jobs