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

Compare with Current View Page History

« Previous Version 3 Current »

General

When a backup Job Scheduler instance in a Job Scheduler Backup/Failover cluster takes over, it could be usefull that someone will be informed about this. Here comes a simple approach how to get this.

JobScheduler Clusters. Sending email on take over

The idea is to make a job that starts once on Job Scheduler start and sends an email on certain conditions. One condition in a backup/failover cluster could be the host name of the server the backup Job Scheduler is running.

Here is the xml for this kind of job.

 <job  title="Send Mails" order="no" name="CheckStart">
     <description >
         <include  file="jobs/JobSchedulerManagedMailJob.xml"/>
     </description>
 
     <params >
         <param  name="to" value="admin@company.com"/>
         <param  name="subject" value="Job Scheduler has been startet."/>
         <param  name="host" value="smtp.server"/>
         <param  name="body" value="Job Scheduler has been startet"/>
     </params>
 
     <script  language="java" java_class="sos.scheduler.managed.JobSchedulerManagedMailJob"/>
 
     <monitor  name="check" ordering="0">
         <script  language="java:javascript">
             <![CDATA[
 function spooler_process_before() {
     spooler_log.info(spooler.hostname);
     return (spooler.hostname == "js_backup");
 }
              ]]>
         </script>
     </monitor>
 
     <run_time  once="yes"/>
 </job>
 
  • No labels