<?xml version="1.0" encoding="ISO-8859-1"?>
<spooler>
  <config>
    <jobs>

      <!-- this job simply says hello world -->
      <job name  = "sample_hello_world"
           title = "Sample for hello world">

          <description>
              <include file = "jobs/JobSampleHelloWorld.xml"/>
          </description>

           <script language = "java"
                   java_class = "HelloWorld">
               <![CDATA[
                  import sos.spooler.Job_impl;

                  public class HelloWorld extends Job_impl {

                      public boolean spooler_process() {
                          System.out.println("hello world");
                          return false;
                      }
                  }
               ]]>
           </script>

      </job>


      <!-- This job is started when a file is inserted or modified in a directory that matches the given pattern -->
      <job name  = "sample_api_notification"
           title = "sample for job start triggered by directory notification using the API">

          <description>
              <include file = "jobs/JobSampleAPINotificationJava.xml"/>
          </description>

          <params>
              <param name = "output_directory"  value = "/tmp"/>
          </params>

          <script language   = "java"
                  java_class = "JobSampleAPINotification"/>

          <start_when_directory_changed directory = "/tmp/input.api" regex = ".*"/>

          <delay_after_error error_count = "1" delay = "00:05"/>
          <delay_after_error error_count = "3" delay = "01:00"/>
          <delay_after_error error_count = "5" delay = "stop"/>

      </job>

    </jobs>
  </config>
</spooler>
