I'm trying to use Jenkins to run a small monitoring script every minute on two separate ECS clusters. In the text box that opens when you enable "Build periodically with parameters" I wrote:
* * * * * %CLUSTER=Cluster1;
* * * * * %CLUSTER=Cluster2;
This works fine for Cluster1 but it does not run for Cluster2. It does not fail, it just doesn't run. If you switch the lines it works for Cluster2 (which is now at the top) but not for Cluster1. I made sure the node it runs on has enough runners, and that "Execute concurrent builds if necessary" is enabled. The closest thing I found while googling is this, and I checked but there is a blank line after these and adding another or removing it or adding a space between them does not help.
I have a bad workaround which is just squeezing both runs in an unparametrized build and that works but it is inflexible.
So to reiterate the question, why does Jenkins not run concurrent builds from cron, and what can I do to change that?
Thanks.
EDIT:
When you insert a cron schedule of * * * * *, Jenkins posts the following:
Do you really mean "every minute" when you say "* * * * *"? Perhaps you meant "H * * * *" to poll once per hour.
As I need it to be on a per minute basis this is (for the 1st one, but not for the 2nd) the desired result. Based on Ian W's suggestion to do replace the schedule from "* * * * * " to "H/2 * * * *". I checked it but this still led to only the 1st one being run, and would have caused it to run every other minute and not every minute as intended. H/1 doesn't run at all, and H/0.5 returns an error of
Invalid input: "H/0.5 * * * * %CLUSTER=Cluster1;": line 2:3: step must be positive, but found 0
I also tried H/1.1 but that returned:
Invalid input: "H/1.1 * * * * %CLUSTER=Cluster1;": line 2:4: unexpected char: '.'
The closest I got so far was staggering the cron jobs like so:
H/2 * * * * %CLUSTER=Cluster1;
* * * * * %CLUSTER=Cluster2;
Which caused both jobs to run every 2 minutes.
BTW, the Jenkins version is 2.204.1, the Parametrized Scheduler plugin is on version 0.8, if any other plugins are relevant I can post their versions as well.