title: Disable InboundChannelAdapter / Poller with autoStartup false
body: <p>In Spring Integration, I want to disable a poller by setting the autoStartup=false on the InboundChannelAdapter. But with the following setup, none of my pollers are firing on either my Tomcat instance 1 nor Tomcat instance 2. I have two Tomcat instances with the same code deployed. I want the pollers to be disabled on one of the instances since I do not want the same job polling on the two Tomcat instances concurrently.</p>
  <p>Here is the InboundChannelAdapter:</p>
  <pre><code>@Bean
  @InboundChannelAdapter(value = &quot;irsDataPrepJobInputWeekdayChannel&quot;, poller = @Poller(cron=&quot;${batch.job.schedule.cron.weekdays.irsDataPrepJobRunner}&quot;, maxMessagesPerPoll=&quot;1&quot; ), autoStartup = &quot;${batch.job.schedule.cron.weekdays.irsDataPrepJobRunner.autoStartup}&quot;)
  public MessageSource&lt;JobLaunchRequest&gt; pollIrsDataPrepWeekdayJob() {
  
      return () -&gt; new GenericMessage&lt;&gt;(requestIrsDataPrepWeekdayJob());
  }
  </code></pre>
  <p>The property files are as follows. Property file for Tomcat instance 1:</p>
  <pre><code># I wish for this job to run on Tomcat instance 1
  batch.job.schedule.cron.riStateAgencyTransmissionJobRunner=0 50 14 * * *
  
  # since autoStartup defaults to true, I do not provide:
  #batch.job.schedule.cron.riStateAgencyTransmissionJobRunner.autoStartup=true
  
  # I do NOT wish for this job to run on Tomcat instance 1
  batch.job.schedule.cron.weekdays.irsDataPrepJobRunner.autoStartup=false
  
  # need to supply as poller has a cron placeholder
  batch.job.schedule.cron.weekdays.irsDataPrepJobRunner=0 0/7 * * * 1-5
  </code></pre>
  <p>Property file for Tomcat instance 2:</p>
  <pre><code># I wish for this job to run on Tomcat instance 2
  batch.job.schedule.cron.weekdays.irsDataPrepJobRunner=0 0/7 * * * 1-5
  
  # since autoStartup defaults to true, I do not provide:
  #batch.job.schedule.cron.weekdays.irsDataPrepJobRunner.autoStartup=true
  
  # I do NOT wish for this job to run on Tomcat instance 2
  batch.job.schedule.cron.riStateAgencyTransmissionJobRunner.autoStartup=false
  
  # need to supply as poller has a cron placeholder
  batch.job.schedule.cron.riStateAgencyTransmissionJobRunner=0 50 14 * * *
  </code></pre>
  <p>The properties files are passed as a VM option, e.g. &quot;-Druntime.scheduler=dev1&quot;. I cannot disable the poller on one of the JVMs using &quot;-&quot; as the cron expression -- something similar to the ask here: <a href="https://github.com/spring-projects/spring-integration/issues/3371" rel="nofollow noreferrer">Poller annotation with cron expression should support a special disable character
  </a></p>
  <p>My goal of being able to call the job manually from either Tomcat instance 1 or Tomcat instance 2 is working. My problem with the setup mentioned above, is that none of the pollers are firing as per their cron expression.</p>