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
Related
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 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.
We use CloudBees-2.138.2.2 Jenkins and have had lot of challenges to trigger jenkins jobs only based on commits in our Github repo. I am still looking for the exact working script for scripted pipeline and not declarative one.
so For example :- pipelineTriggers([cron('0-59/2 * * * *')]), works
but pipelineTriggers([pollSCM('0-59/2 * * * *')]), never works despite new commits
was able to make it work using :-
pipelineTriggers([pollSCM('* * * * *')]) under properties
This way the job polls the repo every minute and will trigger build only when it detects a new commit.
You can try adding the following in your scripted pipeline
properties([pipelineTriggers([githubPush()])])
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.