I have a plain Jenkins job.
The job is restricted to run on a single node using label.
The node and the job settings are set to execute in parallel.
I use "parameterized scheduler" plugin to run 4 instances of this job in parallel every 30 minutes like shown below:
*/30 * * * * %app=myapp1
*/30 * * * * %app=myapp2
*/30 * * * * %app=myapp3
*/30 * * * * %app=myapp4
As you can see the parameter(app=) is different for each run.
However, only one instance of this job runs tree first one i.e app=myapp1
Can you please suggest what needs to be done to fix the problem.
Note: when i change the cron time to */30, */31, */32, */33 then this works fine. Infact i even see parallel execution of the same job incase the job takes more than a minute to complete.
In summary my issue is about running multiple instances of the same job in parallel using cron and not a manual trigger.
With manual trigger i m able to have multiple instances running in parallel.
Related
I am trying to run a Jenkins job with Build Periodically with parameters plugin, and here is my cron syntax but its not working.
27 17 * * 1-5 %Parameter1=Value
However, the same job is working fine for below cron
*/2 * * * 1-5 %Parameter1=Value
Can someone help me what is wrong in my syntax
I need to schedule a job in jenkins that runs every hour except that it should not run between 11:30pm and 4am. What would be the cron expression?
This cron expression 0 4-23 * * 7 will run every day at the hour between 4AM and 11PM.
If you are not required to run this job at exactly when the hour starts, you can also use H 4-23 * * 7. H (for hash) is useful on Jenkins, as it will not execute all your scheduled jobs for the hour at exactly the same time, because it will try to even the load on the system (e.g. this job might run at 11.10PM).
How to run Jenkins pipeline continuously?
The pipeline is started and once it's finished it runs again and so on
I tried */1 * * * * to run every minute but it's not waiting until the previous pipeline is finished but I need to wait until finished and only after it start running it again
You can disableConcurrentBuilds() in your pipeline. This will prevent it to run till the previous ones complete.
Why not trigger a new run of the pipeline as a last step (or a post step depending on a condition if you need to) of this same pipeline?
See the build step to do so: https://www.jenkins.io/doc/pipeline/steps/pipeline-build-step/#build-build-a-job
I need to schedule a job in Jenkins to run in every 5 minutes. I could do that: */5 * * * *
However, the peculiarity here, is that this job should start at 3:05pm and then run indefinitely.
Can someone help me please?
I am using Jenkins script polling.
[ScriptTrigger] - Poll with a shell or batch script IS CHECKED
script value is
#!/bin/ksh
return 0
Exit Code PARAMETER IS 0
polling Schedule is * * * * *
The polling is never happening and the build run only if i schedule a build manually .
What am i doing wrong? What should i change?
The script trigger log is
[ScriptTrigger] - Poll with a shell or batch script
Polling has not run yet.