Hi, 

I have created a job (Jenkins ver. 2.60.3) using pipeline definition and 
it's 'triggers' directive for eg.

```
    triggers { cron('0 4 * * *') }
```

My expectation was that once the job is created, it would get triggered as 
per the specified cron expression by the system timer. However it seems the 
job doesn't get periodically scheduled on creation. Only when it's manually 
built once, the "Build periodically" field of the config gets populated 
with the same cron expression as the one in the pipeline definition. Then 
from next day onwards the job runs at 4 am as expected. 

This is just my observation but I also noticed today that the docs do 
mention that 'triggers' actually means 're-triggers'.

Accepts a cron-style string to define a regular interval at which the 
> Pipeline should be re-triggered


https://jenkins.io/doc/book/pipeline/syntax/#triggers 

Just want to confirm that my conclusion about this behaviour of pipeline is 
correct as I couldn't find much clarification about it nor anyone else 
facing the same issue.

Thanks,
Vineet

-- 
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/c108a900-0517-4888-9a64-9936dcd37daf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to