What are Jenkins build triggers and how do cron expressions with `H` work?
IntermediateConceptJenkins
Answer
Triggers include SCM webhook (GitHub hook trigger), pollSCM, cron, upstream job completion, and remote HTTP trigger with a token. The H symbol hashes the job name to pick a stable offset, spreading load instead of firing every job at minute 0. H/15 * * * * means every 15 minutes at a job-specific offset; H 2 * * 1-5 means once between 02:00 and 02:59 on weekdays.
triggers { cron('H 2 * * 1-5') }
More on Jenkins
What is Jenkins and how is its architecture organised?BeginnerWhat are executors, nodes and labels in Jenkins?IntermediateWhy should you not run builds on the Jenkins controller?BeginnerHow do inbound (JNLP/WebSocket) and SSH agents connect to the controller?IntermediateWhat is a Jenkinsfile and where does it live?BeginnerDeclarative versus Scripted Pipeline: what are the differences?Intermediate