Source:
<code>public static void checkTriggers(final Calendar cal) { Jenkins inst = Jenkins.getInstance(); SCMTrigger.DescriptorImpl scmd = inst.getDescriptorByType(SCMTrigger.DescriptorImpl.class); if (scmd.synchronousPolling) { LOGGER.fine("using synchronous polling"); if (previousSynchronousPolling == null || previousSynchronousPolling.isDone()) { previousSynchronousPolling = scmd.getExecutor().submit(new DependencyRunner(new ProjectRunnable() { public void run(AbstractProject p) { for (Trigger t : (Collection<Trigger>) p.getTriggers().values()) { if (t instanceof SCMTrigger) { LOGGER.fine("synchronously triggering SCMTrigger for project " + t.job.getName()); t.run(); } } } })); } else { LOGGER.fine("synchronous polling has detected unfinished jobs, will not trigger additional jobs."); } } for (ParameterizedJobMixIn.ParameterizedJob p : inst.getAllItems(ParameterizedJobMixIn.ParameterizedJob.class)) { for (Trigger t : p.getTriggers().values()) { if (t !=null && t.spec != null && t.tabs != null) { if (!(t instanceof SCMTrigger && scmd.synchronousPolling)) { LOGGER.log(Level.FINE, "cron checking {0} with spec ‘{1}’", new Object[]{p, t.spec.trim()}); if (t.tabs.check(cal)) { LOGGER.log(Level.CONFIG, "cron triggered {0}", p); try { t.run(); } catch (Throwable e) { LOGGER.log(Level.WARNING, t.getClass().getName() + ".run() failed for " + p, e); } } else { LOGGER.log(Level.FINER, "did not trigger {0}", p); } } } else { <START> LOGGER.log(Level.WARNING, "The job {0} has a syntactically incorrect config and is missing the cron spec for a trigger", p.getFullName()); <END> } } } }</code><technical_language>spec is optional for a Trigger IIUC. check if (!(t instanceof SCMTrigger && scmd.synchronousPolling)) it, log level message adjusted</technical_language>

Target:
public static void checkTriggers(final Calendar cal) { Jenkins inst = Jenkins.getInstance(); SCMTrigger.DescriptorImpl scmd = inst.getDescriptorByType(SCMTrigger.DescriptorImpl.class); if (scmd.synchronousPolling) { LOGGER.fine("using synchronous polling"); if (previousSynchronousPolling == null || previousSynchronousPolling.isDone()) { previousSynchronousPolling = scmd.getExecutor().submit(new DependencyRunner(new ProjectRunnable() { public void run(AbstractProject p) { for (Trigger t : (Collection<Trigger>) p.getTriggers().values()) { if (t instanceof SCMTrigger) { LOGGER.fine("synchronously triggering SCMTrigger for project " + t.job.getName()); t.run(); } } } })); } else { LOGGER.fine("synchronous polling has detected unfinished jobs, will not trigger additional jobs."); } } for (ParameterizedJobMixIn.ParameterizedJob p : inst.getAllItems(ParameterizedJobMixIn.ParameterizedJob.class)) { for (Trigger t : p.getTriggers().values()) { if (!(t instanceof SCMTrigger && scmd.synchronousPolling)) { if (t !=null && t.spec != null && t.tabs != null) { LOGGER.log(Level.FINE, "cron checking {0} with spec ‘{1}’", new Object[]{p, t.spec.trim()}); if (t.tabs.check(cal)) { LOGGER.log(Level.CONFIG, "cron triggered {0}", p); try { t.run(); } catch (Throwable e) { LOGGER.log(Level.WARNING, t.getClass().getName() + ".run() failed for " + p, e); } } else { LOGGER.log(Level.FINER, "did not trigger {0}", p); } } else { LOGGER.log(Level.WARNING, "The job {0} has a syntactically incorrect config and is missing the cron spec for a trigger", p.getFullName()); } } } } }