Cannot be done from a Jenkinsfile. You can do via the groovy console with something like
for (var f in Jenkins.instance.getAllItems(jenkins.branch.MultiBranchProject.class) { if (f.parent instanceof jenkins.branch.OrganizationFolder) { // managed by org folder, leave alone continue; } // addTrigger will replace an existing one f.addTrigger(new com.cloudbees.hudson.plugins.folder.computedPeriodicFolderTrigger("1d")); } On 26 July 2017 at 20:03, Ramanathan Muthaiah <rus.cah...@gmail.com> wrote: > On Thursday, July 27, 2017 at 5:12:55 AM UTC+5:30, Yuri Govorushchenko > wrote: >> >> Hello, >> >> I have a *Multibranch Pipeline* job and would like to programatically >> set its property found in UI at *Scan Multibranch Pipeline Triggers -> >> Periodically if not otherwise run -> Interval*. Ideally I'd like to do >> it in a scripted *Jenkinsfile* used to define the job. Maybe it can be >> somehow achieved via properties step? It seems to be a property of >> CloudBees Folders Plugin >> <https://wiki.jenkins.io/display/JENKINS/CloudBees+Folders+Plugin> but I >> couldn't figure out how it can be modified without a UI. >> > > We are on the same boat . . . would be interested to know how this can be > done; if you hit upon the solution, pls do share here. > > /Ram > > -- > You received this message because you are subscribed to the Google Groups > "Jenkins Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to jenkinsci-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/jenkinsci-users/ace70cd8-afa6-4966-a82c-e449cad3eeef%40googlegroups. > com > <https://groups.google.com/d/msgid/jenkinsci-users/ace70cd8-afa6-4966-a82c-e449cad3eeef%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CA%2BnPnMybN0tg-cDnmNmc0vcRCEpNGRMdAYj3U%2BOc2-gmYykwQA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.