A Jenkins job can be triggered either manually or automatically. There are three common automatic triggers:
Whenever a developer commits code, the change is automatically applied on the server — this is achieved using WebHooks.
Repository → Settings → Webhooks → Add webhook
jenkinsURL:8080/github-webhook/application/jsonThen, in Jenkins: Job → Configure → Build Triggers → check "GitHub hook trigger for GITScm polling" → Save.
Job → Configure → Build Periodically. This runs on CRON syntax.
The cron format has 5 stars: * * * * *
Example: Aug 28, 11:30 AM, Sunday build → 30 11 28 08 0
* * * * * means a build every single minute. */5 * * * * means every 5 minutes. For reference, use the website crontab.guru.
Note: with Build Periodically, the build happens on schedule whether the code changed or not.
Also based on cron syntax, but only runs a build if there's an actual change in the GIT repo within that window.
| Trigger | Behaviour | Scope |
|---|---|---|
| Webhooks | Build happens the instant a commit is pushed | Only works with GIT/GitHub |
| Poll SCM | Checks periodically, builds only if changes exist | Only works with GIT |
| Build Periodically | Builds on a fixed schedule 24x7, regardless of changes | Works for any DevOps tool, not just Git |
Hands-on live training, real projects, and placement support — become job-ready in DevOps.
Enroll in DevOps Training →