I am using a parameterized cron in my Jenkins script to run with 2 different sets of build param - one would run every 5 mins in production, and every 15 minutes in staging. The production one is running every 5 mins, but the staging one is not running. Can someone please tell me what I might be missing?
properties([
pipelineTriggers([parameterizedCron(env.BRANCH_NAME != 'master' ? '''
H/5 * * * * % environment=production
H/15 * * * * % environment=staging''' : '')]),
parameters([
choice(name: 'environment', defaultValue: 'sandbox', choices: ['sandbox', 'staging', 'production'], description: "etc")
])
])
A made a slight modification as follows and surprisingly this time only the staging one is running
properties([
pipelineTriggers([parameterizedCron('''H/2 * * * * % environment=production'''), parameterizedCron('''H/4 * * * * % environment=staging''')]),
parameters([
choice(name: 'environment', defaultValue: 'sandbox', choices: ['sandbox', 'staging', 'production'], description: "etc")
])
])
I can't find the reason why either is working half-way only.
Can someone please tell me what can be changed to fix the issue?