Skip to content

Commit e9c8abe

Browse files
DrLehres0nance
andauthored
Add example of how to set a parameterizedCron from pipeline-as-code (#41)
* Add example of how to set a parameterizedCron from pipeline-as-code Hopefully will save someone the hours I lost trying to figure this out. * Use widely documented terminology Co-authored-by: Raihaan Shouhell <[email protected]>
1 parent 74713d3 commit e9c8abe

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,18 @@ Example Output in Jenkins
8282
=========================
8383
![Example Output in Jenkins](https://raw.githubusercontent.com/jenkinsci/parameterized-scheduler-plugin/master/site/images/scheduledBuilds.PNG)
8484

85+
86+
## Scripted Pipeline Example
87+
88+
```
89+
properties(
90+
parameters([
91+
string(name: 'PLANET', defaultValue: 'Earth', description: 'Which planet are we on?'),
92+
string(name: 'GREETING', defaultValue: 'Hello', description: 'How shall we greet?')
93+
]),
94+
pipelineTriggers([
95+
parameterizedCron('*/2 * * * * %GREETING=Hola;PLANET=Pluto'),
96+
parameterizedCron('*/3 * * * * %PLANET=Mars')
97+
])
98+
)
99+
```

0 commit comments

Comments
 (0)