'schedule cron to run on any of a set of computers
I have around 20 cron jobs that run at various times over 3 computers, some of them run at the same time, some at even hours, some at odd hours. Some take 5 minute to complete, other up to 20 hours. The jobs i'm running are bash scripts.
I would like some of these jobs to run in a seamless fashion on any node of a set of computers, but always one instance at the time (for now i handle this "one at the time maximum" using /usr/bin/flock
).
One constraint i have is that i want certain jobs to run only on the same node due to hardware and network limitations.
But i still want to have only one cron file to edit. For now i have to edit as many cron files that i have nodes, which is unpractical.
Is there a conventional way to achieve this ?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|