Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
jeremy_kofoot
Contributor III
Contributor III

How to check if QlikView task has failed

Just wondering if anyone has created a bat file or anyway to check if a QlikView task has failed.

I would like to create a bat file or powershell script to be kicked off by a windows task to check to see if a task failed and if it did use an external trigger to kick off the task again.  I have got external triggers working and I've created a powershell script to have it check the file size of a qvd and if it is 0kb to kick off the task again.  I would like to change this though to look specifically at the task itself to see if it fails because sometimes when our task fails it fails in the middle of the store statement so the file isn't 0kb.

5 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

You can find the last task status by looking at the xml files in C:\ProgramData\QlikTech\DistributionService\TaskResults.  You will have to join with the files in ..\Tasks if you need tasknames.  You can also get history for a task from ..\TaskExecutionHistory.  The last entry is the latest execution for that task.

-Rob

http://masterssummit.com

http://qlikviewcookbook.com

http://www.easyqlik.com

jeremy_kofoot
Contributor III
Contributor III
Author

Thanks for the quick reply Rob.  From your experience there isn't really a way to check outside of logs to see if the task has failed, or is it just easier to check the log and just check for failed string.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

C:\ProgramData\QlikTech\DistributionService\Task* folders a bit of a database that stores current task status.  Scanning script logs would work too.


There is probably something available in the QMS API as well, I'm not sure where off the top of my head.

https://help.qlik.com/en-US/qlikview-developer/12.1/apis/QMS%20API/html/7b30b3a1-77da-4bbe-bdc2-1320...


-Rob

swuehl
MVP
MVP

vireshkolagimat
Creator III
Creator III

Hi, How about the configuring the alerts if a task fails?

Regards,

Viresh