marcusspitzmiller / QlikSenseTask

Active - QlikSenseTask is a tool for starting Qlik Sense tasks from the command line.
24 stars 13 forks source link

Not working from Qlik script #13

Open SanderQlik opened 6 years ago

SanderQlik commented 6 years ago

We want to use this tool to reload an app from a Qlik Sense script.

For example : IF x = 'A' THEN Run task A ELSE Run task B END IF

The tool reloads a task perfectly when used in a command Window but it isn't working when executed from Qlik script with this command: EXECUTE lib://QlikSenseTask\QlikSenseTask.exe -task:"Reload task of Dashboard A"

The tool creates a new logfile but that's it. The logfile stays empty. Qlik Sense is in Legacy mode and execution of commands is set in the settings.

What can I do to make this work?

marcusspitzmiller commented 6 years ago

Hmm, i haven't really tested for this scenario. Can I ask why you don't just use the sense scheduler with a trigger? Are you executing QlikSenseTask to a different environment or same?

SanderQlik commented 6 years ago

Hi @marcusspitzmiller, correct, we use a different environment : TimeXtender!

TimeXtender creates the Sense app and reloads the app. We have a second app as dashboard. This second app does a binary reload of the first app. Normally both apps are scheduled in Qlik Sense. But with TimeXtender the first app isn't added to the Scheduler so we can't schedule our dashboard based on the data app.

That's why we are trying your solution : we added it in the TimeXtender code. TimeXtender reloads the first app. At the end of the script of the first app it will trigger the reload of the dashboard app.

But sadly, your app seems not to work like we use it.

marcusspitzmiller commented 6 years ago

I understand now. Last night i pushed some changes with more logging. Can you try this new version and post any logging output that might come? Also whatever process is running your reload must have access to the task if it doesn't already.

SanderQlik commented 6 years ago

Hi @marcusspitzmiller, with the new version the same result : a empty logfile and the task isn't starting :-(

SanderQlik commented 5 years ago

Hi @marcusspitzmiller, at the moment I'm working on another project for another client. So a totally other Qlik Sense environment. Again I tried to execute a task from within a Qlik script. The result is the same : an empty log file and no running task :-(

Business case : An environment with 30+ dashboards, each dashboard is one customer environment. It takes to long to reload daily all dashboards. My client wants to reload only the dashboards for which new data are available. So first I check for new data and then I want to reload only the dashboards that are related to the new data.

Pseudo code: FOR row = 1 TO NOOFROWS('CustomersWithNewData') LET vCust = PEEK('Customer', $(row), 'CustomersWithNewData')

EXECUTE "C:\QlikSenseTask\qliksensetask.exe" -task:"Reload Orders $(vCust)"

NEXT row

Can I possibly help you to get this working? It would be fantastic if I could use your solution for my projects.

SanderQlik commented 5 years ago

Another test, triggering QlikSensTask with a Windows task. Result : exactly the same. No running task, empty log.