Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

Scheduler triggered builds #2905

vart ·
hi Robin,

A question about scheduled builds .. we have builds in qb that have a schedule on ..

so whenever i do user.getName() for Scheduler it says cannot getName on a null value .. i am guessing that this is because in case of scheduler there is no user there a way that we can classify the Trigerred by builds via if triggered by user or if triggered by the Scheduler
  • replies 3
  • views 932
  • stars 0
robinshen ADMIN ·
In case of scheduled builds, build.scheduled will return true.
drdt ·

Is there a way to get this information while evaluating "Build Condition"? I have enabled a setting so that scheduled builds can be disabled system-wide, as follows (please pardon my XML):

<buildCondition class="com...AndBuildCondition">
        <criteria class="com...VariableBuildCondition">
        <criteria class="com...BuildIfChanged"/>

However, this is also preventing active dependencies from being triggered when "sysSchedulerIsEnabled=false". I believe that if I add a check for "build.scheduled=true", it will fail because "build=null". Is this correct and is there a workaround?

robinshen ADMIN ·

Call request.isScheduled() in this case.