title: How to set cronExpression programatically using javacode for Quartz Scheduler with Spring?
body: <p>BackGround :</p>
  
  <p>I am using Quartz scheduler with Spring to schedule a cronjob.</p>
  
  <p>Question:</p>
  
  <p>I am configuring the scheduler options in my applicationconfig file. Rather, I want to specify these options programatically in my java class. Any ideas on how to achieve this? 
  My Code is as below,</p>
  
  <p>ApplicationConfig</p>
  
  <p>
      <br>
    
      
     
      
      <br>
      </p>
  
  <pre><code>&lt;!-- Cron Trigger --&gt;
  &lt;bean id="SimpleTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean"&gt;
    &lt;property name="jobDetail" ref="TaskJobDetail" /&gt;
    &lt;property name="cronExpression" value="0 19 14 * * ?" /&gt;  
  &lt;/bean&gt;
  
  &lt;bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean"&gt;
   &lt;property name="jobDetails"&gt;
      &lt;list&gt;
      &lt;ref bean="TaskJobDetail" /&gt;
      &lt;/list&gt;
  &lt;/property&gt;  
  &lt;property name="triggers"&gt;
      &lt;list&gt;
      &lt;ref bean="SimpleTrigger" /&gt;
      &lt;/list&gt;
  &lt;/property&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>I want to set the cronExpression programatically in my java class. Any ideas please?</p>