title: Using cron value from properties file in spring scheduler
body: <p>I am using the Spring Schedular in my Spring Boot Application. I have defined the cron expression a properties file:</p>
  <pre><code>batch.delete-job.cron=0 0 0 * * *
  </code></pre>
  <p>I am using this value in my method annoated with the @Scheduled Annotation as follows:</p>
  <pre><code>@Scheduled(cron = &quot;${batch.delete-job.cron}&quot;)
  public void doBatchJob() {
  
  }
  </code></pre>
  <p>I keep on getting the error messsage:</p>
  <p>Encountered invalid @Scheduled method 'doBatchJob': Cron expression must consist of 6 fields (found 1 in &quot;${batch.delete-job.cron}&quot;)</p>
  <p>If I use the cron expression directly in annotation, then it works. What am I doing wrong?</p>