Versions Compared

Key

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

Table of Contents
outlinh1. true
outlinh1. true
1printablefalse
2stylh1. none
3indent20px

Problem

  • I need to modify the standard Ee-mail textbody

Solution

  • change Change the stylesheet for the e-mail appointment

...

  • processing
  • The e-mail stylesheet is

...

  • contained in the

...

  • file ./config/scheduler_mail.xsl. See attached sample of scheduler_mail.xsl.
  • You can change any text contained in the stylesheet, e.g. for messages like this:
Code Block
languagexml
titleSample extract from stylesheet
...
    <xsl:template match="/scheduler_event [@event='database_wait']" mode="custom-message">

It would be better for your purposes if you write your own mail job, which then can be called in specific situations (e.g. when specific errors occur). You can use for this the JobSchedulerManagedMailJob standard job: a description of this job can be found in the installation directories, which are located in the jobs folder. (Note that this only applies if you have installed the JobScheduler with the 'Job Package: Housekeeping Jobs' option.)

Your job could then look like this:

Code Block
 <job title = "Send Mail" order = "no" stop_on_error = "yes">
      <params>
        <param name="to" value="<mail_adress>" />
        <param name="from" value="<mail_adress>" /<!-- body text in case of database errors with need_db = yes -->
        <param<xsl:if nametest="subject$lang='de'" value="this is my mail" />
        <param name="host" value="<smtp_server>" />>Beim Zugriff auf die Datenbank ist ein Fehler aufgetreten. Der JobScheduler wartet bis die Datenbank wieder verfügbar ist.</xsl:if>
        <param<xsl:if nametest="queue_directory" value="c:\temp\smtp" />
        <param name="body" value="this is my body" />
  $lang='en'">Error occurred accessing the database. The JobScheduler will wait until the database is accessible.</xsl:if>
    </params>
    <script language="java" java_class="sos.scheduler.managed.JobSchedulerManagedMailJob">
    </script>
 </job>

...

xsl:template>
...

 

Please note that individual changes to the stylesheet

  • will apply for all e-mail being sent by a JobScheduler Master. 
  • must be re-configured for each new installation of JobScheduler. The configuration is maintained during updates of the JobScheduler installation.

See also