title: Liferay Scheduler not working after server restart
body: <p>I am scheduling a job using the code below.</p>
  
  <pre><code>@Controller
  @RequestMapping("VIEW")
  public class MyController {
  
      @RenderMapping
      public String defaultView() {
          try {
              String cronText = "0 30 12 1/1 * ? *";
              String description = "Message Scheduler Description";
              String destinationName = DestinationNames.SCHEDULER_DISPATCH;
              int exceptionsMaxSize = 0;
              String portletId = "portletId";
  
              Message message = new Message();
              message.put(SchedulerEngine.MESSAGE_LISTENER_CLASS_NAME,SchedulerListener.class.getName());
              message.put(SchedulerEngine.PORTLET_ID, portletId);
  
              Trigger trigger = new CronTrigger(SchedulerListener.class.getName(), SchedulerListener.class.getName(), cronText);
              SchedulerEngineHelperUtil.schedule(trigger,StorageType.PERSISTED, description, destinationName, message, exceptionsMaxSize);
          }catch (SchedulerException e) {
              e.printStackTrace();
          }
          return "view";
      }
  }
  </code></pre>
  
  <p>The problem with the above code is that the scheduler is valid only till the server session. Once this method is executed, I want to trigger the schedulerjob at the mentioned time even after a server restart. Is there a way to implement this in liferay?</p>