title: Spring scheduler tasks: read configuration on running time
body: <p>I am using spring 3.0.7 and some scheduled jobs: </p>
  
  <pre><code>public class TestScheduler implements Runnable{
  
  private String someValue;
  
  public void setSomeValue(String someValue) {
          this.someValue= someValue;
      }
  
  @Override
  public void run(){
      LOGGER.info("Some value: " + this.someValue);
  }
  </code></pre>
  
  <p>Configuration:</p>
  
  <pre><code>&lt;property name="someValue" value="${config.someValue}"/&gt;
  </code></pre>
  
  <p>The value <code>${config.someValue}</code> is defined in a config.properties file. 
  I would like to be able to read the value on this config file every time the scheduled job is executing the run() method, so I don´t have to restart the server every time I change the value of the variable I want to print.</p>
  
  <p>Is there any procedure to do it? I have been reading about <a href="http://static.springsource.org/spring-batch/apidocs/org/springframework/batch/core/annotation/BeforeJob.html" rel="nofollow">@BeforeJob</a> annotation, but I don´t know how could I apply it on scheduled jobs, since the <a href="http://static.springsource.org/spring-batch/reference/html-single/index.html#interceptingJobExecution" rel="nofollow">documentation I read</a> is based on JobExecution.</p>
  
  <p>Thanks in advance</p>