Jenkins build periodically with parameters

In this tutorial, How do I use “Jenkins build periodically with parameters”? Using “Parameterized Scheduler” Plugin. The default, not yet Parameterized Scheduler plugin in Jenkins. A Jenkins plugin to support parameter in this build scheduler. Jenkins the essential for DevOps Roles.

Jenkins build periodically with parameters

Step 1: Setup the Parameterized Scheduler plugin

In “Manage Jenkins” –> In “Available” tab –> Select “Parameterized Scheduler” –> click “Install without restart”.

Jenkins build periodically with parameters

To restart Jenkins services

[huupv@huupv devopsroles]$ sudo /etc/init.d/jenkins restart

Step 2: Configure example

In this example, I using two parameters: NAME and SITE.

Jenkins build periodically with parameters 02

In “Build Triggers” tab, select “Build periodically with parameters”

Jenkins setting automation run job with parameters every fifteen minutes as the picture below

# every fifteen minutes auto run job
H/15 * * * * % NAME=Huu; SITE=WWW.DEVOPSROLES.COM

Jenkins build periodically with parameters 03

Example “Execute shell” basic.

Jenkins build periodically with parameters 05

Conclusion

Thought the article, you can use Jenkins build periodically with parameters as above. I hope will this your helpful.

About HuuPV

My name is Huu. I love technology and especially Devops Skill such as Docker, vagrant, git so forth. I likes open-sources. so I created DevopsRoles.com site to share the knowledge that I have learned. My Job: IT system administrator. Hobbies: summoners war game, gossip.
View all posts by HuuPV →

4 thoughts on “Jenkins build periodically with parameters

  1. Hi Huu,

    Thanks your post has helped me a lot, but I am not able to trigger build periodically when passing multiple values in one parameter, please let me know if you know the syntax for the same.

    On my project have put one parameter with multiple check box

    1. Hi Ibrahim Patel,
      Could you tell me for example? One parameter with multiple checkbox?
      you can click sign ? in plugin parameter tell your the syntax.
      Thanks,

  2. Hi Huu,

    Thanks for you post. Could you please help on below scenairo.
    — I have create a job which will have parameter
    – I have used choice parameters, in that i have 2 items i.e. (user1,user2)

    Now, i want my job to execute first with user1 and user2.

    As of now, i am doing this manually by selecting user1 or user2.

    Thanks in advance…!

    1. Hi Suresh,

      Thank you reading my blog. You can refer example,
      ################
      parameterss = “user1,user2”
      targets = parameterss.split(“,”)
      for (String artifact : targets){
      sh “””
      echo $artifact
      “””
      ############
      have a good nice!

Leave a Reply

Your email address will not be published. Required fields are marked *

Comment moderation is enabled. Your comment may take some time to appear.

This site uses Akismet to reduce spam. Learn how your comment data is processed.