Versions Compared

Key

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

...

This element specifies the order-controlled or standalone jobs for which notifications are being sent to a system monitor.This feature is not supported for standalone jobs

Support for standalone jobs starting with

Jira
serverSOS JIRA
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverId6dc67751-9d67-34cd-985b-194a8cdc9602
keyJITL-400
.

 

Job supports the following attributes:

...

TimerJobChainOnce more inside element job chainsMinimum
ElementElement descriptionDescription
TimerJob Optional or once inside of Timer element 

Restricts notifications for

jobs.

Jira
serverSOS JIRA
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverId6dc67751-9d67-34cd-985b-194a8cdc9602
keyJITL-401
 

TimerJobChainOptional or once inside of Timer elementRestricts notifications for job chains
MinimumOptional or once inside of Timer elementMinimum required execution time for job chains or selected job nodes. Allows script code to be executed that returns the minimum execution time in seconds.
MaximumOptional or once inside of Timer elementMaximum allowed execution time for job chains or selected job nodes. Allows script code to be executed that returns the maximum execution time in seconds.
Code Block
languagexml
titleExample
collapsetrue
<SystemMonitorNotification system_id="op5"> 
  ... 
  <Timer name="my_timer_1"> 
    <TimerJobChain name="test/my_jobchain_1" />
    <TimerJob name="test/my_job_1" /> 
    <Maximum><Script language="javascript"><![CDATA[1000]]></Script></Maximum> 
  </Timer> 
 
  <Timer name="my_timer_2"> 
    <TimerJobChain name="test/my_jobchain_2" /> 
    <TimerJobChain name="test/my_jobchain_3" /> 
    <Minimum><Script language="javascript"><![CDATA[500]]></Script></Minimum> 
    <Maximum><Script language="javascript"><![CDATA[1000]]></Script></Maximum> 
  </Timer> 
</SystemMonitorNotification> 

...

AttributeUsageDescription
 nameRequired

Corresponds to Timer used in the SystemMonitorNotification / Notification / NotificationObjects / TimerRef element.

The name must be unique across all timers definitions.name must be unique across all timers definitions.

Code Block
languagexml
titleExample
collapsetrue
...
<Timer name="my_timer">
... 

 

SystemMonitorNotification / Timer / TimerJob

Jira
serverSOS JIRA
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverId6dc67751-9d67-34cd-985b-194a8cdc9602
keyJITL-401

TimerJob support the following attributes: 

AtributeUsageDescription
 scheduler_idOptional

Notifications are restricted to the JobScheduler instance with the given identification. By default notifications will be sent for all JobScheduler instances that log into the same database.

Regular expression can be used.

 nameOptional

Job chain name including possible folder names.

Regular expression can be used.

 

 

Code Block
languagexml
titleExample
collapsetrue
...
<TimerJob scheduler_id="scheduler_4444" /> 
... 
<TimerJob scheduler_id="scheduler_4444" name="^(test/my_.
<Timer*)" /> 
... 
<TimerJob name="test/my_timerjob"/> 
...  

 

SystemMonitorNotification / Timer / TimerJobChain

...

TimerJobChain support the following attributes:

...

Code Block
languagexml
titleExample (job)
collapsetrue
<?xml version="1.0" encoding="ISO-8859-1"?> 
<job  title="Sample Job with Store Result Monitor" order="yes" stop_on_error="no" tasks="1">     
  <params>
     <!--
     set the scheduler_notification_result_parameters parameter
     -->         
    <param name="scheduler_notification_result_parameters" value="file_size"/>     
  </params>     
  
  <!--
  calculate and create the new order parameter if necessary
  -->
  <script language="javascript"><![CDATA[             
      function spooler_process(){                                  
        var order    = spooler_task.order;                 
        var params   = spooler.create_variable_set();                 
        params.merge(spooler_task.params);                 
        params.merge(order.params);                      
        
        // parameter scheduler_file_path was set in the previous job chain step
        var file     = new java.io.File(params.value("scheduler_file_path"));                 
        var fileSize = file.length()/1024;                 
        order.params.set_var("file_size",fileSize.toString());                          
      return true;             
      }]]>     
   </script>          
 
   <!-- 
   set the StoreResultsJobJSAdapterClass as a monitor
   -->     
   <monitor  name="notification_monitor" ordering="1">         
     	<!-- JobScheduler version 1.9.x, 1.10.x -->
	<script java_class="com.sos.scheduler.notification.jobs.result.StoreResultsJobJSAdapterClass" language="java"/>
        -->
   
        <!-- JobScheduler version 1.11.x --> 
        <!--
        <script java_class="com.sos.jitl.notification.jobs.result.StoreResultsJobJSAdapterClass" language="java"/> 
        --> 
   </monitor>

   <run_time /> 
</job> 

...

...