Skip to end of metadata
Go to start of metadata

We need to be able to define a repeat job that does not go beyond a specific date, i.e. does not repeat forever


  • I would like a job that would repeat until, say, 01/01/2013.


First of all, you should work with schedules. Schedules are run_times that have a name and can be referenced from jobs or orders.

  • Create a NeverRun schedule which has a single start in the past, so it will never run:

     <?xml version="1.0" encoding="ISO-8859-1"?>
     <schedule name="NeverRun">
        <date date="1978-11-17">
            <period single_start="01:00"/>

    (Note that you can also find this code in the NeverRun.schedule.xml file in our download.)

  • Assign this schedule to your job or order: edit the runtime parameter and remove everything until you just have <run_time schedule="NeverRun"/>.

     <?xml version="1.0" encoding="ISO-8859-1"?>
        <script language="shell">
     echo halloo welt!
        <run_time schedule="NeverRun"/>
  • Now the trick is that you can replace schedules with other schedules for a certain period. This means you can create a repeat schedule which will replace the NeverRun schedule until 01/01/2013:

     <?xml version="1.0" encoding="ISO-8859-1"?>
     <schedule substitute="NeverRun"
              valid_to="2013-01-01 00:00">
            <day day="1 4 5">
                <period repeat="00:05" begin="06:00" end="06:30"/>

    (You can also find this code in our download, this time in the Repeat.schedule.xml file.)



Write a comment…