Versions Compared

Key

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

...

  • Download the sample of a job chain for Windows: daily_report.zip
  • Unzip the archive to the JobScheduler Master's ./config/live folder
  • The extracted files are offered available from a sub-directory ./config/live/daily_report

...

  • For starters the jobs to be used are explained with individual articles, see Summary.
  • Next a job chain Dailydaily_Reportreport is created that serializes execution of the above jobs.
    • Keep in mind that you will not need all reports as they provide redundant data, e.g. the Task History Report includes similar report reporting data as the Job Stream History Report.
    • Purpose The main purpose of the reports is to allow different perspectives on historic data, therefore make your choice which report you will need.
    • The jobs scripts are added three parameters, report_date_fromreport_date_to and report_file_path, that are provided by the order for the job chain, see below.
  • Then a send_mail job is added.
  • Finally an order is created to parameterize and to schedule execution of the job chain.

...

  • There is no specific sequence in which the reporting jobs are have to be executed. Each job writes result results to an individual worksheet in of the Excel report file.
  • For the final job send_report no error handling is configured. Should this job fail to send an e-mail then the e-mail file is written to the ./mail folder for later processingand will later on be picked up by the /sos/sendMail/sendMail job chain that will retry to send unsuccessful mail.

Job: send_report


Code Block
languagexml
titleJob: send_report
linenumberstrue
collapsetrue
<?xml version="1.0" encoding="UTF-8" ?>

<job title="Send report by mail" order="yes" stop_on_error="false">
  <params>
    <param name="subject" value="JobScheduler Daily Report"/>
    <param name="content_type" value="text/html"/>
    <param name="body" value="<html><body><div><p>Hi,<br><br>please find attached report generated by JobScheduler for Order History, Task History, and Daily Plan.<br><br>Have a great day<br>JobScheduler Team</div></p></body></body></html>"/>
    <param name="attachment" value="\${REPORT_FILE_PATH}"/>
  </params>
  <environment/>
  <script language="java" java_class="sos.scheduler.managed.JobSchedulerManagedMailJob"/>
  <monitor name="configuration_monitor" ordering="0">
    <script language="java" java_class="com.sos.jitl.jobchainnodeparameter.monitor.JobchainNodeSubstituteMonitor"/>
  </monitor>
  <run_time/>
</job>

...