Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents
outlinh1. true
outlinh1. true
1printablefalse
2stylh1. none
3indent20px

<span ih1. "sunday">

...

Prevent the execution of a job or an order

...

for the last sunday of a month

<span style"color:#A52A2A">
I would like to know if there a way to prevent the execution of a job or an order at a specific day?
For example, a job or an order which runs every day of every month. But I would like to stop it the last Sunday of each month.
</span>

it is a little bit tricky to prevent the execution of a job or an order at the last sunday of the month, but it works:

 

Code Block
languagexml
titleExample run-time configuration
<run_time>

...


  <weekdays>
    <day dahy="1 2 3 4 5 6">
      <period single_start"13:00"/>

...


    </day>

...


  </weekdays>

...


  <monthdays>
    <weekday day="7" which"-1">

...


      <period single_

...

star="13:00"/>

...


    </weekday>

...


    <weekday day="7"

...

 which="-2">

...


      <period single_start="13:00" when_

...

holiday="ignore_holiday"/>

...


    </weekday>

...


    <weekday day="7"

...

 which="-3">

...


      <period single_start="13:00" when_

...

holiday="ignore_holiday"/>

...


    </weekday>

...


    <weekday day="7"

...

 which="-4">

...


      <period single_start="13:00" when_

...

holiday="ignore_holiday"/>

...


    </weekday>

...


  </monthdays>

...




  <holidays>
    <weekdays>
      <day day"7"/>

...


    </weekdays>

...


  </holidays>

...


</run_time>

 

 


<span ih1. "specificday">
h2. prevent the execution of a job or an order at a specific monthday
<span style"color:#A52A2A">
How to run a job or an order every day but stop it the 15th of each month?
</span>
<run_time>
<monthdays>
<day dah1. "1 2 3 4 5 6 7 8 9 10 11 12 13 14 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31">
<period single_start"13:00"/>
</day>
</monthdays>
</run_time>
<span ih1. "holyday">
h2. stop a job or an order for a not predefined period
<span style"color:#A52A2A">
_How can I stop a job or an order for a specific period which is not defined previously?
_
Example: my order is a daily order. But on e.g. 2013-05-01 I have a maintenance on the machine. So I would like to stop one chain or all the chains.''
</span>

To prevent the execution of a job or an order at a specific (not predefined) day you can define a holidays file (./config/live/holiday.xml)

No Format

        <holidays>
            <holiday dath1. "2013-05-01"/>
        </holidays>

and include it into your job(s) and order(s) with

No Format

        <run_time>
            <period  single_start"12:00"/>
            <holidays >
                <include live_filh1. "/holiday.xml"/>
            </holidays>
        </run_time>

...