title: how to schedule task in spring scheduler by using calendar object?
body: <p>I am developing a web application based on spring. Requirement is as follows :<br>
  <strong>User enters a date (in string format).</strong><br>
  <strong>Schedule a task for that date (only once)</strong>.  </p>
  
  <p>My code is:  </p>
  
  <pre><code>calendar.setTime(formatter.parse(dateFromForm));
  int day = calendar.get(Calendar.DAY_OF_MONTH);
  int month = calendar.get(Calendar.MONTH);
  .
  .
  String cornExp = "0 "+minutes+" "+hours+" "+day+" "+month+" "+year;
  </code></pre>
  
  <p>i want to pass <code>cornExp</code> value to:  </p>
  
  <pre><code>@Scheduled(cron=**cornExp**)  
  </code></pre>
  
  <p>how can i do this?</p>