Multi Container Deployment and Cron Jobs


I am using the npm cron module to create some datasets nightly on one of my apps. Based on a schedule they create a number of reports in my database.

For a short while now I’ve used 2 galaxy containers to run this application and this has resulted in these being triggered twice, resulting in duplicates.

The obvious fix is to set a unique index on the collection they are writing two, which I have done.

I wonder if there is a way to trigger a scheduled process on only one of multiple containers or to spread the load of a batch of jobs between containers.


Use the job-collection package:


Another option is the synced-cron package: