how to config triger

37 views
Skip to first unread message

Pakpoom

unread,
Sep 15, 2025, 7:24:40 PMSep 15
to schedulix
how to config job schedulix 2.7  for  job success or fail triger to script send e-mail / run web hook open ticket ?

thank you
pakpoom

Dieter Stubler

unread,
Sep 16, 2025, 6:06:49 AMSep 16
to schedulix

Hello Pakpoom,

The key to setup notifications are triggers which, defined at Batch/Job level, allow to dynamically submit another Batch / Job on defined events. The implementation of the notification itself has to be implemented by the customer by creating a script which interfaces with your desired notification system. Examples are scripts to send mails, interfacing with ticket systems to create tickets, ...

To notify on job failure, the trigger types  IMMEDIATE MERGE and FINISH CHILD are the ones typically used.
To notify success BEFORE and AFTER FINAL triggers can be used to submit a notifier on successful execution.

For jobs /batches submitted by a trigger some additional system parameters providing context information are available to be used by the notifier job.
This trigger context parameters provides the information which job caused and/or defined the execution of the trigger and the exit state causing the trigger firing.

More Information on Triggers can be found here:

https://independit.de/Downloads/bicsuite_web_en-2.11.pdf [Page 165+ (trigger tab)].

https://independit.de/Downloads/syntax_en-2.11.pdf [Page 197+ (create trigger) and 161 (trigger parameters)].

By the way, Release 2.7 is quite outdated already and we strongly recommend to update your systems to 2.11 to be up to date again.
There will be no patches or fixes to 2.7 anymore.

Best Regards
Dieter

Pakpoom

unread,
Sep 16, 2025, 7:53:19 PMSep 16
to schedulix
Hi  Dieter,

    Thanks you Dieter, 
    I’ve successfully tested the setup, but I have a follow-up question: how can I pass a variable containing a .log or .err file name job success/fail  to a trigger that executes a script?


Best Regards
Pakpoom

ในวันที่ วันอังคารที่ 16 กันยายน ค.ศ. 2025 เวลา 17 นาฬิกา 06 นาที 49 วินาที UTC+7 Dieter Stubler เขียนว่า:
Screenshot_job.jpg

Dieter Stubler

unread,
Sep 17, 2025, 1:09:57 AM (14 days ago) Sep 17
to schedulix
Hello Pakpoom,

To get any information on the job causing a trigger to be fired you can use the $TRIGGERORIGINID system parameter in the run program of the trigger job.
The run program/script of the trigger can then use the schedulix API to retrieve any desired information.

Example:
Job A triggering job B if job A fails.
The run program of B looks like:
    notify.sh $TRIGGERORIGINID ...
Inside  of notify.sh you can execute assuming the TRIGGERORIGINID is the first parameter: 
    echo "show job $1;" | sdmsh | egrep '^ +(LOGFILE|ERRLOGFILE|WORKDIR|SCOPE_ID|HTTP)'  
The output is something like this:
    SCOPE_ID : GLOBAL.EXAMPLES.LOCALHOST.SERVER
    HTTPHOST : bicsuite.2.12.mint-development
    HTTPPORT : 8900
    WORKDIR : /home/dieter/independIT/Development/BICsuite/Versions/work/SDMS/SDMS/sandbox/tmp
    LOGFILE : 132352.log
If the notify job is running on the same host as the failed job, you can directly access the logfile in your script using the values given for WORKDIR and (ERR)LOGFILE.
If the notifier job is running on a different host than the triggering job HTTPHOST and  HTTPPORT can be used with curl/wget or alike to access the logfile by using the URL:
    http://<HTTPHOST>:<HTTPPORT>/?FNAME=<WORKDIR>/<LOGFILE>
which is in the example:
This way you can retrieve the logfile from the http server of the job server which ran the failed job or embed the URL into the notification message to be sent.

Hope this helps you further

Regards
Dieter

Pakpoom

unread,
Sep 17, 2025, 2:52:49 AM (14 days ago) Sep 17
to schedulix
Hello  Dieter,

         Thanks you , The $TRIGGERORIGINID  is work.

Best Regards
Pakpoom

ในวันที่ วันพุธที่ 17 กันยายน ค.ศ. 2025 เวลา 12 นาฬิกา 09 นาที 57 วินาที UTC+7 Dieter Stubler เขียนว่า:
Reply all
Reply to author
Forward
0 new messages