how do I configure Scan Multibranch Pipeline Triggers for a specific time every day?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

how do I configure Scan Multibranch Pipeline Triggers for a specific time every day?

red 888

In the UI the only options I have is interval: 

zzzz.png

But I want all my scans to happen at midnight (they will get queued up and thats fine) not have them happen during the day spread out

How do I have scans happen at the same time every night for my jobs?

Trying to do this with job dsl this is isnt causing it to scan at night. I dont understand the relationship between spec and interval:

it / 'triggers' << 'com.cloudbees.hudson.plugins.folder.computed.PeriodicFolderTrigger'{ spec '0 0 * * *' // not working interval "60000" }

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/b6239e0a-a178-4b2c-9d9a-12e1e3750e50n%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: how do I configure Scan Multibranch Pipeline Triggers for a specific time every day?

John Patrick
I have a groovy script to create my multi branch projects, so not the ui, but I would use this snippet;

multibranchPipelineJob(multibranchProjectId) {
...
   triggers {
      cron('H 8 * * 1-5')
   }
...
}

So cron would execute daily once between 8 and 9 am, but only on monday to friday.

For some projects I use periodic which I think is the ui element you are showing and the groovy would be;

triggers {
  periodic(5)
}

This is where I researching what is avaliable fields https://jenkinsci.github.io/job-dsl-plugin/#path/multibranchPipelineJob

John


On Thu, 17 Sep 2020 at 13:10, [hidden email] <[hidden email]> wrote:

In the UI the only options I have is interval: 

zzzz.png

But I want all my scans to happen at midnight (they will get queued up and thats fine) not have them happen during the day spread out

How do I have scans happen at the same time every night for my jobs?

Trying to do this with job dsl this is isnt causing it to scan at night. I dont understand the relationship between spec and interval:

it / 'triggers' << 'com.cloudbees.hudson.plugins.folder.computed.PeriodicFolderTrigger'{ spec '0 0 * * *' // not working interval "60000" }

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/b6239e0a-a178-4b2c-9d9a-12e1e3750e50n%40googlegroups.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAH9u10%3DNUHQrtNAjpG2-MwwQ%2BiOUntycfOYwOwAiGEwW%3Dj1SmA%40mail.gmail.com.