title: Spring setting application property programmatically
body: <p>Basically I have some cron - properties in my application.yml:</p>
  
  <pre><code>B = 0 11/15 * * * ?
  </code></pre>
  
  <p>I have a bean RefresherB which has </p>
  
  <pre><code>@Scheduled(cron = "${B}")
  public void refresh() {
      //Refreshing
  }
  </code></pre>
  
  <p>I also have a rest endpoint from which I want to update this B property</p>
  
  <pre><code>@RequestMapping("schedule")
  public boolean changeRefreshSchedule(@QueryParam("cron") String expression){
  </code></pre>
  
  <p>Where I want to update the B property so that the RefresherB bean also gets the update. How would I go about doing this? I do not want to change the application.yml file only update the value for runtime.</p>