Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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
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.
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.
-Rob
It should work using the QMSAPI as well, something like this
Hi, How about the configuring the alerts if a task fails?
Regards,
Viresh