Q:

Combining Build triggers in Jenkins

I have two build triggers (poll SCM and FStrigger-MonitorFiles) configured for a job, say the polling is scheduled for daily poll (@daily) , Now the build is triggered if poll SCM detects change or FStrigger-MonitorFiles does which is normal behavior.
But if both detects the change the build will be triggered twice as each triggers tries to trigger the build , how do i achieve combining the results of above two triggers daily and trigger/not trigger the build only once.

A:

You could create a special trigger job that is scheduled for both triggers.
Inside this job by using system groovy script you could check if any build of the target job has been built today. Then according to the results of the check this job does or does not trigger the target job.

