<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="scheduler_job_documentation.xsl"?>
<description xmlns="http://www.sos-berlin.com/schema/scheduler_job_documentation_v1.0" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sos-berlin.com/schema/scheduler_job_documentation_v1.0 http://www.sos-berlin.com/schema/scheduler_job_documentation_v1.0.xsd">

  <job name  = "JobSampleAPINotificationPerlScript"
       title = "Sample job for API usage that is triggered by changes to a directory"
       order = "no">
    <script language = "perlscript"
            resource = "1"/>
  </job>

  <releases>
    <release id="1.0" created="2006-02-20" modified="2006-02-21">
      <title>Version 1.0</title>
      <author name="Andreas Püschel" email="andreas.pueschel@sos-berlin.com"/>
      <note language="de"><div xmlns="http://www.w3.org/1999/xhtml">Initiale Auslieferung</div></note>
      <note language="en"><div xmlns="http://www.w3.org/1999/xhtml">initial release</div></note>
    </release>
  </releases>

  <resources>
    <file os="all" type="other" file="./jobs/sample_script_notification.pl" id="1">
      <note language="de"><div xmlns="http://www.w3.org/1999/xhtml">Implementierungsbeispiel</div></note>
      <note language="en"><div xmlns="http://www.w3.org/1999/xhtml">Sample Implementation</div></note>
    </file>
  </resources>

  <configuration>
    <params id="job_parameter">
      <param name="output_directory" default_value="/tmp" required="true">
        <note language="de">
          <div xmlns="http://www.w3.org/1999/xhtml">
            Der Parameter benennt das Verzeichnis, in das Eingbedateien verschoben werden.
          </div>
        </note>
        <note language="en">
          <div xmlns="http://www.w3.org/1999/xhtml">
            This parameter specifies the directory to which incoming files are moved.
          </div>
        </note>
      </param>
    </params>
  </configuration>

  <documentation language="de">
    <div xmlns="http://www.w3.org/1999/xhtml">
      Der Job zeigt wie die API Methoden des Job Schedulers zur Protokollierung
      und Fehlerbehandlung eingesetzt werden.
      Die Implementierung verwendet die API-Methoden <code>spooler_init(), spooler_open(), spooler_process()</code>
      etc., die automatisch vom Job Scheduler aufgerufen werden.
      Alternativ kann das Script ohne diese Methoden implementiert werden.
      <br/><br/>
      Um den Job automatisch bei Änderungen in einem Verzeichnis zu starten, sollten Sie das Element:
      <br/><br/>
      <code>
        &lt;start_when_directory_changed directory="/tmp/input.api" regex=".*" /&gt;
      </code>
      <br/><br/>
      hinzufügen, in dem <em>regex</em> einen regulären Ausdruck für die erwarteten Dateinamen spezifiziert.
      Geben Sie das Element mehrfach an, wenn mehrere Verzeichnisse überwacht werden sollen.
    </div>
  </documentation>

  <documentation language="en">
    <div xmlns="http://www.w3.org/1999/xhtml">
      This job shows how to use the Job Scheduler API for logging and error handling.
      The implementation uses the methods <code>spooler_init(), spooler_open(), spooler_process()</code>
      etc. of the API that are automatically called by the Job Scheduler.
      An alternative straightforward implementation would not make use of these methods.
      <br/><br/>
      To make this job start triggered by changes to a directory you should add the element:
      <br/><br/>
      <code>
        &lt;start_when_directory_changed directory="/tmp/input.api" regex=".*" /&gt;
      </code>
      <br/><br/>
      where <em>regex</em> is a regular expression that denotes the filenames that are triggered.
      <br/>
      Add multiple elements to monitor more than one directory.
    </div>
  </documentation>
</description>
