title: How to skip batch step when condition is false
body: <p>I have one basis job with one basic step. This jobs is executing every x second (I am using quartz for this). Then in my config class I also have variable "runStep". Where should I add this attribute and run my step only if runStep is true ?</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;batch:job id="export1" parent="baseJob"&gt;
      &lt;batch:step id="registruj" parent="baseStep"&gt;
          &lt;tasklet&gt;
              &lt;chunk reader="registrujReader" processor="registrujProcessor" writer="registrujWriter"
                  commit-interval="1" /&gt;
          &lt;/tasklet&gt;
      &lt;/batch:step&gt;
  &lt;/batch:job&gt;
  
  &lt;bean id="baseJob" class="org.springframework.batch.core.job.SimpleJob" abstract="true"&gt;
      &lt;property name="jobRepository" ref="jobRepository" /&gt;
  &lt;/bean&gt;
  
  &lt;bean id="baseStep" class="org.springframework.batch.core.step.factory.SimpleStepFactoryBean" abstract="true"&gt;
      &lt;property name="transactionManager" ref="transactionManager" /&gt;
      &lt;property name="jobRepository" ref="jobRepository" /&gt;
      &lt;property name="startLimit" value="100" /&gt;
      &lt;property name="commitInterval" value="1" /&gt;
  &lt;/bean&gt;
  
  &lt;bean id="jobRepository" class="org.springframework.batch.core.repository.support.JobRepositoryFactoryBean"
      p:dataSource-ref="expDataSource" p:transactionManager-ref="transactionManager" /&gt;
  
  &lt;bean id="jobLauncher" class="org.springframework.batch.core.launch.support.SimpleJobLauncher"&gt;
      &lt;property name="jobRepository" ref="jobRepository" /&gt;
  &lt;/bean&gt;
  
  &lt;bean class="org.springframework.batch.core.configuration.support.JobRegistryBeanPostProcessor"&gt;
      &lt;property name="jobRegistry" ref="jobRegistry" /&gt;
  &lt;/bean&gt;
  
  &lt;bean id="jobRegistry" class="org.springframework.batch.core.configuration.support.MapJobRegistry" /&gt;
  
  &lt;bean id="registrujWriter" class="cz.isvs.reg.rob.util.export.batch.RegistrujItemWriter" scope="step" /&gt;
  &lt;bean id="registrujReader" class="cz.isvs.reg.rob.util.export.batch.RegistrujItemReader" scope="step" /&gt;
  &lt;bean id="registrujProcessor" class="cz.isvs.reg.rob.util.export.batch.RegistrujItemProcessor" scope="step" /&gt;
  
  &lt;!-- run every 10 seconds --&gt;
  &lt;bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean"&gt;
      &lt;property name="triggers"&gt;
          &lt;bean id="cronTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean"&gt;
              &lt;property name="jobDetail" ref="jobDetail" /&gt;
              &lt;property name="cronExpression" value="*/10 * * * * ?" /&gt;
          &lt;/bean&gt;
      &lt;/property&gt;
  &lt;/bean&gt;
  
  &lt;bean id="jobDetail" class="org.springframework.scheduling.quartz.JobDetailBean"&gt;
      &lt;property name="jobClass" value="cz.isvs.reg.rob.util.export.batch.JobLauncherDetails" /&gt;
      &lt;property name="group" value="quartz-batch" /&gt;
      &lt;property name="jobDataAsMap"&gt;
          &lt;map&gt;
              &lt;entry key="jobName" value="export1" /&gt;
              &lt;entry key="jobLocator" value-ref="jobRegistry" /&gt;
              &lt;entry key="jobLauncher" value-ref="jobLauncher" /&gt;
          &lt;/map&gt;
      &lt;/property&gt;
  &lt;/bean&gt;
  </code></pre>