Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
joshabbott
Creator III
Creator III

Tasks with multiple levels running into eachother

Hello!

I've set up some tasks in the QMC with triggers 'on successful completion of the previous task'.  For example:

Task 1 - Trigger - Run every hour

Task 2 - Trigger - Run on completion of Task 1

Task 3 - Trigger - Run on completion of Task 2

Task 1 and 2 create qvd files that task 3 reads.  The problem I'm running into is, sometimes, task 3 isn't finished running when task 1 kicks back up.  How do I make it so Task 1 skips its hourly reload if Task 2 or Task 3 is still running?  Thank you for any help!

1 Solution

Accepted Solutions
maxgro
MVP
MVP

I think you should add something (it could be a file or a flag in a file) to indicate the task 2 or 3 is running.

At the start of task 2 you set the flag (RUN) and at the end of 3 you reset (NOTRUN).

Task 1 should read in loop the flag (look at sleep function) and wait until there is the NOTRUN.

Another option is to abort task 1 when there is a RUN (this is if you want to wait until next hourly reload; you can abort with a load from a not existing qvd).

You also need a little .qvw to reset  the flag (NOTRUN) when task2 or task3 aborts (when failed).

View solution in original post

6 Replies
MindaugasBacius
Partner - Specialist III
Partner - Specialist III

Task 1 - Trigger - Run every hour and a half.

joshabbott
Creator III
Creator III
Author

Task 2 and 3 are inconsistent thought, it might need to wait 2 hours, and if it only needs to wait 1 hour, then it should run every hour.

HirisH_V7
Master
Master

Hi,

Can you please specify the exact time taking for each and every tasks,Mean while In that Does Task1 and Task 2 both create QVD's or there are dashboards.

may be this way, If the time taking for each & every Task is not constant means. You can go with a individual QVW with both QVD generation and loading  the data in the same dashboard itself which is promptly required to update regularly.

HTH,

Hirish

HirisH
“Aspire to Inspire before we Expire!”
ramchalla
Creator
Creator

First check the time it takes all the tasks to complete. Then you will come to know how to schedule the Task1.

maxgro
MVP
MVP

I think you should add something (it could be a file or a flag in a file) to indicate the task 2 or 3 is running.

At the start of task 2 you set the flag (RUN) and at the end of 3 you reset (NOTRUN).

Task 1 should read in loop the flag (look at sleep function) and wait until there is the NOTRUN.

Another option is to abort task 1 when there is a RUN (this is if you want to wait until next hourly reload; you can abort with a load from a not existing qvd).

You also need a little .qvw to reset  the flag (NOTRUN) when task2 or task3 aborts (when failed).

joshabbott
Creator III
Creator III
Author

I think this may be the best option, thank you!