You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

prevent the execution of a job at the last sunday of a month

<span stylh1. "color:#A52A2A">
I would like to know if there a way to prevent the execution of a job at a specific day. For example, I have a job which run every day of every month. But I would like to stop it the last sunday of each month. How can I do this?
</span>

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

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

<weekday day="7" which="-1">
<period single_start="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>
</source>
}}

prevent the execution of a job at a specific mothday

<span style"color:#A52A2A">
How to run a job every days but stop it the 15th of each month?
</span>

{{

<source>
<run_time>
<monthdays>

<day day="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>
</source>
}}

stop a job for a not predfined period

<span stylh1. "color:#A52A2A">
How can I stop a job for a specific period which is not define previously?
Example: my job is a daily job. But tomorrow I have a maintenance on the machine. So I would like to stop one chain or all the chain.
</span>

To prevent the execution of a job at a specific (not predefined) day you can define a holidays file and include
it into your job(s) with
{{

<source>
<holidays>
<include live_file="/holiday.xml"/>
</holidays>
</source>
}}

If it is necessary to define a day for maintenance you have to put it into holiday.xml and it would take effect for all jobs using this file via live_file"/holiday.xml" (caution: you have to restart the scheduler if you have changed holiday.xml).

  • No labels