The default configuration defines no specific handling for e-mail that JobScheduler sends when a job runs longer or shorter than expected.
E-Mail for jobs that run shorter than an expected value
The attribute <job warn_if_shorter_than="111">
specifies the value for the minimum expected duration of a job run in seconds.
To configure e-mail handling please open the file scheduler_mail.xsl from the config
folder add this template:
<xsl:template match="/scheduler_event [@severity='error' and @event='task_step_too_short']" mode="custom-subject"> <subject> <xsl:if test="$lang='de'">[warning] Task lief kürzer als die erwartete minimale Dauer</xsl:if> <xsl:if test="$lang='en'">[warning] Task runs shorter than the expected duration</xsl:if> </subject> </xsl:template> <xsl:template match="/scheduler_event [@severity='error' and @event='task_step_too_short']" mode="custom-message"> <xsl:if test="$lang='de'">Task lief kürzer als die erwartete minimale Dauer.</xsl:if> <xsl:if test="$lang='en'">Task runs shorter than the expected duration.</xsl:if> </xsl:template>
E-Mail for jobs that run longer than an expected value
The attribute <job warn_if_longer_than="10">
specifies the value for the maximum expected duration of a job run in seconds.
To configure e-mail handling please open the file scheduler_mail.xsl from the config
folder and add this template:
<xsl:template match="/scheduler_event [@severity='error' and @event='task_step_too_long']" mode="custom-subject"> <subject> <xsl:if test="$lang='de'">[warning] Task lief länger als die erwartete maximale Dauer</xsl:if> <xsl:if test="$lang='en'">[warning] Task runs longer than the expected duration</xsl:if> </subject> </xsl:template> <xsl:template match="/scheduler_event [@severity='error' and @event='task_step_too_long']" mode="custom-message"> <xsl:if test="$lang='de'">Task lief länger als die erwartete maximale Dauer.</xsl:if> <xsl:if test="$lang='en'">Task runs longer than the expected duration.</xsl:if> </xsl:template>
Resources
- Example file: scheduler_mail.xsl