Thanks you mark,

sorry I hadn't seen your answer earlier. As another alternative, a 
colleague of mine found the "Parameterized Scheduler plugin" which is 
simple to use and does the job nicely as shown here: 
https://www.shellhacks.com/jenkins-schedule-build-periodically-parameters/
Have a good day !

Le lundi 14 mars 2022 à 14:13:28 UTC+1, Mark Waite a écrit :

> On Monday, March 14, 2022 at 2:44:52 AM UTC-6  François wrote:
>
>> no one knows how to limit a cron to a branch in a Jenkinsfile ?
>>
>>
> See 
> https://github.com/jenkinsci/packaging/blob/5707f90ede196076fcd1308e517c90d52e0e9d99/Jenkinsfile#L6
>  
> for one technique to consider.  It makes the cron property conditional 
> based on if the current branch is the primary branch in the repository.
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/3203e7e5-a2e4-4430-b77a-0f0f4884c049n%40googlegroups.com.

Reply via email to