title: Spring batch does not start reading the list from the beginning
body: <p>I am using a Task Scheduler to run the batch job that runs after every 10 seconds. But, after every 10 seconds the reader begins the reading from 2nd element in the list.
  My custom reader:</p>
  
  <pre><code>public class DataReader implements ItemReader&lt;User&gt; {
  
      @Autowired
      private MainDAO mainDAO;
      private int counter;
      private List&lt;User&gt; userList;
  
      @PostConstruct
      public void init() {
          this.userList = this.mainDAO.getAllUsers();
      }
  
      public User read() throws Exception, UnexpectedInputException, ParseException, NonTransientResourceException {
          // TODO Auto-generated method stub
          System.out.println(counter);
          if(counter &lt; userList.size())
              return userList.get(counter++);
          return null;
      }
  
  }
  </code></pre>
  
  <p>It always starts reading from 2nd element in the list while the counter must be set to zero when the class is created.
  My Run Scheduler:</p>
  
  <pre><code>@Component
  public class RunScheduler {
  
      @Autowired
      private JobLauncher jobLauncher;
  
      @Autowired
      private Job job;
  
      public void run() {
          try {
              String dateParameter = new Date().toString();
              JobParameters parameter = new JobParametersBuilder().addString("date", dateParameter).toJobParameters();
  
              System.out.println(dateParameter);
  
              JobExecution execution = this.jobLauncher.run(job, parameter);
              System.out.println("Exit status: " + execution.getStatus());
  
          }
          catch(Exception exception) {
              exception.printStackTrace();
          }
      }
  
  }
  </code></pre>
  
  <p>My Spring configuration for Spring batch:</p>
  
  <pre><code>&lt;!-- Spring Batch Configuration: Start --&gt;
  
      &lt;bean id="customReader" class="com.arpit.reader.DataReader" /&gt;
  
      &lt;bean id="customProcessor" class="com.arpit.processor.DataProcessor" /&gt;
  
      &lt;bean id="customWriter" class="com.arpit.writer.DataWriter" /&gt;
  
      &lt;batch:job id="invoiceJob"&gt;
          &lt;batch:step id="step1"&gt;
              &lt;batch:tasklet&gt;
                  &lt;batch:chunk reader="customReader" processor="customProcessor" writer="customWriter" commit-interval="1" /&gt;
              &lt;/batch:tasklet&gt;
          &lt;/batch:step&gt;
      &lt;/batch:job&gt;
  
      &lt;bean id="transactionManager" class="org.springframework.batch.support.transaction.ResourcelessTransactionManager" /&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 id="jobRepository" class="org.springframework.batch.core.repository.support.MapJobRepositoryFactoryBean"&gt;
          &lt;property name="transactionManager" ref="transactionManager" /&gt;
      &lt;/bean&gt;
      &lt;!-- Spring Batch Configuration: End --&gt;
  
      &lt;!-- Task Scheduler Configuration: Start --&gt;
  
      &lt;bean id="runScheduler" class="com.arpit.scheduler.RunScheduler" /&gt;
  
      &lt;task:scheduled-tasks&gt;
          &lt;task:scheduled ref="runScheduler" method="run" cron="*/10 * * * * *" /&gt;
      &lt;/task:scheduled-tasks&gt;
      &lt;!-- Task Scheduler Configuration: End --&gt;
  </code></pre>
  
  <p>Can someone please help me figure out what the issue is?</p>