Job-Requests

From Plex-XML

Jump to: navigation, search

You could use the <jobrequest> element for periodic scheduled requests.

Job requests are executed in the background like a batch process and don't have any user interaction. For the usage of job-requests you need to define a "SchedulerServlet" in your web.xml. See Web.xml#Servlet for details.


Job request are basically defined like normal web request. Except for an additional <schedule> element for the definition of the execution interval.
See http://www.opensymphony.com/quartz/api/org/quartz/CronTrigger.html for details

<!-- scheduled for every weekday at 3pm -->
<schedule type="cron" interval="0 0 15 ? * MON-FRI"/>


A common response for a job-request is a e-mail (SENDMAIL), another request or 'nothing'.

  <response>
    <error type="default" name="DEFAULT"/>
    <reaction type="DEFAULT" target="NOTHING"/>
  </response>


Example for a job request scheduled every weekday at 3pm with no respone:

  <jobrequest name="EZBImport">
    <schedule type="cron" interval="0 0 15 ? * MON-FRI"/>
    <request name="SessionAndUser">
      <plex-parameter type="fix" name="Input_BrowserLanguage" value="en_US"/>
      <plex-parameter type="fix" name="Input_RemoteHost" value="localhost" />
      <stoponerror successcode="OK"/>
    </request>
    <response>
      <error type="default" name="DEFAULT"/>
      <reaction type="DEFAULT" target="NOTHING"/>
    </response>
  </jobrequest>
Personal tools