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

Compare with Current View Page History

« Previous Version 2 Next »

Problem

  • the subject of the mail should be customized for jobs ended with error

Solution

  • see "How to configure e-mail service?" to change the JobScheduler configuration if necessary.
  • Change the sytelsheet for JobScheduler e-mail service to define how to handle job errors

from (around line 150 in the xsl)

    <xsl:template match="/scheduler_event [@severity='error' and @event='task_ended']" mode="custom-subject">
               
        <subject>
            <xsl:if test="$lang='de'">[<xsl:value-of select="/scheduler_event/@severity"/>] Task <xsl:value-of select="$job/@job"/> 
                  <xsl:apply-templates select="$task/order"/> mit Fehler beendet</xsl:if>
            <xsl:if test="$lang='en'">[<xsl:value-of select="/scheduler_event/@severity"/>] Task <xsl:value-of select="$job/@job"/> 
                  <xsl:apply-templates select="$task/order"/>  terminated with errors</xsl:if>
        </subject>
    </xsl:template>

to

    <xsl:template match="/scheduler_event [@severity='error' and @event='task_ended']" mode="custom-subject">
               
        <subject>
            <xsl:choose>
              <xsl:when test="$lang='de'">
                [<xsl:value-of select="/scheduler_event/@severity"/>] Task <xsl:value-of select="$job/@job"/> 
                       <xsl:apply-templates select="$task/order"/> mit Fehler beendet
              </xsl:when>
              <xsl:otherwise>
                [<xsl:value-of select="/scheduler_event/@severity"/>] Task <xsl:value-of select="$job/@job"/> 
                       <xsl:apply-templates select="$task/order"/>  terminated with errors              </xsl:otherwise>
            </xsl:choose>
        </subject>
    </xsl:template>

Due to an JobScheduler imprecision the $lang Parameter is not set in any case therefore the shipped solution does not work sometimes and a internal default is used.

  • No labels