2 Replies Latest reply: May 16, 2014 4:44 PM by Dadi Gudmundsson RSS

    Publisher job failure notification via Email

      Is there a way to configure QMC job failure notifications per job? 

      We have option to notify users upon successful distribution.  But can i notify upon failure of the task to support group via email?


        • Re: Publisher job failure notification via Email
          Stefan Wühl

          You can send alert emails on failure, if I remember correctly you can enter the email addresses here:

          QMC-->System-->Distribution Service-->Alert Email


          (assuming email server is already set up under QMC-->System)

          • Re: Publisher job failure notification via Email

            FYI, I had a similar need recently, i.e. upon a task's failure I wanted to send an email to a specific email address that was different than the general one that swuehl pointed out above.


            Since I also had the general alert set up, ANY task failure would send an email alert to the QV "owners" by using (QMC-->System-->Distribution Service-->Alert Email), but with the below setup a separate specific targeted email is sent ONLY when the specific task of interest fails.


            This was done by having a failure on the task of interest trigger a supporting task that triggers a batch file that in turn triggers the BLAT email program (BLAT was VERY easy and quick to use, no formal install).


            Here is a step-by-step outline of how I did this:

            1. I used a "supporting task" that was triggered by the failure of the task I wanted to monitor. (search for "supporting task" in QMC help if unsure)
            2. I downloaded BLAT from here: Blat - Windows Command Line SMTP Mailer - Browse Files at SourceForge.net
            3. I unzipped it into a folder of my choice on Publisher (NOTE: my setup is QV Server AND Publisher, v11.2)
            4. In the same folder I created a new text file. I renamed it to "sendEmail.bat". I then right clicked that file and chose "Edit" and entered the following text: blat -to someone@yourco.com -server yourcohost -f qv@yourco.com -subject "Task X failed" -body "Text of your choice.|Next line in text"
              1. Write the above as one long line, no line breaks. Use the | symbol to get line-breaks in your body text.
              2. Note: before doing all this the "Mail Server" in QMC had already been setup and known to work (see help in QMC). Hence I was able to simply use the "Host name:" entry in the "General" tab under "Mail Server" as the correct entry after the word "-server" above, i.e. I found the word "yourcohost" and simply pasted that in after the word -server.
              3. Same for the entry after "-f" above, I simply used the email address shown in the "From address" on the Mail Server tab in QMC.
            5. I created a supporting task of type "External Program" and made it trigger when the task I wanted to monitor failed.
              1. In the "Command line statement" I entered the exact path to the sendEmail.bat file created earlier, e.g.: C:\myfolder\sendEmail.bat
            6. I then tested this on an old task I know would fail and to my relief this worked on first try. I hope the same for you, but all kinds of things regarding email setups can enter the picture. Hence make sure to have the Mail Server on QMC setup first, e.g. verify that you can send test emails through QMC on the Mail Server tab. Then try the above.


            I hope these detailed instructions will be of value to others. I'm also interested in hearing about other approaches that achieve the same purpose.