Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Chalorme
Partner - Contributor II
Partner - Contributor II

Holding Qlik App Reload in Script Level

Hi Team ⁠👩‍💻

Need a help :
was trying to write a logic in Qlik script level which will hold the Qlik app reload untill today's data is available to display in the dashboard.
Any clue on this?

Sleep will be good I guess but not sure about the qlik engine utilization for the same in case the qlik app reload process is sleeping for a long time (e.g: 2 hours etc.) 

As usual, advance thanks for your help ⁠.
Cheers!! 
Happy Weekend.
-Chalorme😊

Chalorme Roy Mukherjee
4 Replies
marcus_sommer

Sleep supports max. 1 hour. If you need more you will need a loop like:

if num(weekday(today())) = 6 then
   for i = 1 to 6
      sleep 1 * 60 * 59 * 1000 ;
   next
else
   sleep 30;
end if
 
Depending on the entire run-time any timeouts might be touched. Default should be 5 hours before the task is terminated.
 
A side-effect of the sleep-statements is an increase of the RAM consumption of the distribution-engine - not the task-running qvb.exe - because there is more internal communication + logging. But in a properly sized environment it won't be critically.
RafaelBarrios
Partner - Specialist
Partner - Specialist

Hi @Chalorme 

Generally I do not recommend sleep due to resource consumption issues, in addition to taking up a place in the number of simultaneous recharges that can be performed.

If you still want to go that route, what @marcus_sommer says will work for you.

 

Instead of doing that, I would prefer to implement a small task that checks from time to time if the condition is already met, and if so, a chained task is triggered.

Also, I like it better that the external process that is consolidating data uses the Qlik Sense API to trigger a task

https://github.com/marcusspitzmiller/QlikSenseTask

 

Hope this helps.

best

help users find answers! Don't forget to mark a solution that worked for you & to smash the like button! 😊

marcus_sommer

If there is a publisher in place multiple triggers per application could be set which might be used to branch into various task-chains. But without a publisher a single trigger must fulfill all requirements which limits the possibilities quite significantly ...

RafaelBarrios
Partner - Specialist
Partner - Specialist

True @marcus_sommer , but considering we are talking about Qlik sense client managed, you could make that task to fail if the condition it’s not fulfilled, and let it finish if it’s ok so it triggers the following task

this is an example, one task depending on a dummy task that will only execute if dummy execute successfully 

RafaelBarrios_0-1705703735037.jpeg


I still like more the API Way, so you have another program that calls the Qlik Sense task once it’s ready.

 

Hope this helps.

Best,

help users find answers! Don't forget to mark a solution that worked for you & to smash the like button! 😊