1 Reply Latest reply: Mar 31, 2017 1:29 PM by Earl Owens RSS

    How to stop a scheduled task after failure

    Earl Owens

      I'm trying to build a Qlik Sense application that will monitor the processing schedule of our corporate Analysis Services cubes, which is currently lagging into work hours each day.  But I only want the reload tasks to happen while the process is still going and to stop when they are done (which is variable - could be 9am, could be 1pm).  I don't want the task to continue to use memory unnecessarily.

       

      Where I'm struggling is getting the appropriate reload tasks set up. I want to schedule a task to kick off each morning at 5am and run every ten minutes UNTIL the associated QVF fails (which it will do when the SQL table it hits has zero records), at which point it should stop running that day, and then start again the next morning at 5am.

       

      Here are the steps I've taken so far:

       

      1. Scheduled a daily task at 5am to run a simple QFV that checks to see if the Control Master table is available

      2. Created a second task with two event triggers:

           a. Task Event Trigger: reload a second QVF (which counts the number of rows in the process table which are incomplete and has code that will make it fail if the # rows is 0) upon success of the first QFV mentioned in step 1. I WANT THIS TO RUN EVERY 10 MINUTES, BUT THERE APPEARS TO BE NO WAY TO START A SCHEDULE BASED ON AN EVENT TRIGGER. So,

           b. Create a second Trigger that is a Schedule for the second QVF to run every 10 minutes.  PROBLEM: this task will continue to run every 10 minutes, even after it has started to fail, and even though the Max Retries option is set to 0.

      3. Task Event Trigger to reload a data model/dashboard app upon Success of the Step 2 trigger.

       

      Any thoughts on how to accomplish this?  Am I barking up the wrong tree and there's an easier way to accomplish this?

       

      Thanks!

      Earl