Table of Contents | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
General
JobScheduler Order orders and schedules contain the run-time element that specifiec the periods for execution. There could be two use cases:
Use Case 1: Pre-defined days, i.e. non-working days or holidays
To suppress execution on pre-defined non-working days or holidays you could create a holiday calender for all jobs in JobScheduler or for individual orders/jobs. This can be effected by adding the same holiday configuration as an include file to respecticve orders/schedules.
Use Case 2: Ad-hoc days processing should be suppressed
In some Ad-hoc use cases, pre-defined orders and schedules should Schedule's contain the "Time Element" of the scheduling. In some usecases where predefined Order/Schedule's has to be suppressed or should not execute ,but and should resume there their normal execution once "suppressed" time is passed.
There are two approaches to achieve this:
Approach 1: JOE: Add
...
- Open JOE and add holiday into order
- Save order
- deploy the update order in JobScheduler's live folder
JOC :Add holidays to Order
Any change into order from JOC is not persistent and will be lost after JobScheduler restart
- Click on order menu, set run time
- add holidays in to order
- save order
- check start time using option show start time
...
non-working days to order as a persistent change
Hint: Changes effected using JOE are persistent changes and will remain in effect after a JobScheduler restart.
1. Original Order without "holidays/non-working days" will run every day at 08:00 AM
2. Open JOE and add non-working days to order
3. Check run-time and make sure "suppress execution" is selected
4. Save order
Hint: The "suppress execution" option for holidays will not appear in the XML configuration as this is the default value.
Code Block | ||
---|---|---|
| ||
<?xml version="1.0" encoding="ISO-8859-1"?> <job<order title="Checks the last job run" order="yes" stop_on_error="nojob_chain="execute_pf" id="daily"> <settings <run_time let_run="no"> <mail_on_error ><![CDATA[yes]]></mail_on_error> <mail_on_warning ><![CDATA[yes]]></mail_on_warning> <period single_start="08:00"/> <log_level ><![CDATA[debug9]]></log_level> </settings> <holidays > <params > <param<holiday name="JobName" value="Demo/MoneySuperMarket/Scenario03/JobA1date="2014-05-17"/> <param <holiday name="start_time" value date="2014-105-18"/> <param name="message" value="The Job 1. \$\{JOB_NAME\} 2. [JOB_NAME] was not running successfully today until 15:00h "/></holidays> </params> <script language="java" java_class="sos.scheduler.CheckRunHistory.JobSchedulerCheckRunHistoryJSAdapterClass"/> <run_time /> </job> run_time> </order> |
4. Deploy the updated order in JobSchedulers live folder
...
Approach 2: JOC: Add holidays to order as a non-persistent change
Hint: Any changes to orders from JOC are non-persistent and will be lost after a JobScheduler restart.
1. Right-click on the order menu then Set run time
2. Click on Run time editor
3. Click on Holidays
4. Add the required dates that any execution should be suppressed for
5. Check that the option "supress execution" is selected
6. Save the order, now the order XML representation should display the holidays element
7. Check start time using option show start time
Questions
If I enter 'Non-Working Days' values, do I need to change 'When Holiday' in my 'Run Time' entry from 'ignore holiday' to 'suppress execution'?
Yes, but since "suppress execution" when holidays is the default behavior for JobScheduler you will not see the corresponding xml tag in the order configuration.
I have not defined any global holidays, but are any pre-defined and would they cause an order to be suppressed on those days?
No, until you do not explicitly include a holiday calendar in your order/schedule there will not be any pre-defined holidays.