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: 
lukas_sokol
Contributor II
Contributor II

Supporting Tasks - Batch file is not running

Hi

I have simple bat file and I try to execute it as supporting task

If I running the batch file manually its working as expected, but for Supporting Task on QEMC when I try to run

with following command and its not working.

"D:\QV_test\scripts\test.cmd"


I also tried witj(bat or vbs file) or runing it from cmd but still not working

C:\Windows\system32\cmd.exe /savecred /user:administrator /c "D:\QV_test\scripts\test.cmd",

I can run supporting task, but nothing happend.

Any ides what can be wrong

Thanks in advance

Łukasz

6 Replies
marcus_sommer

Have you tried it with an execute-statement: Re: Is it possible to create a batch file in the Qlikview Script?

- Marcus

lukas_sokol
Contributor II
Contributor II
Author

Hi,

I try

EXECUTE D:\QV_test\scripts\test.cmd;

instead of supporting tasks and it's working properly when triggered directly in the file(reload).

However i tried to trigger this document by qmc than nothing happend.

marcus_sommer

In general the approach with execute triggered by the qmc worked - I use it regular for many different things.

For this you need to make sure that for the qmc-user the paths are valid and the access rights are set properly. You could check this by logging in as qmc-user and then running your script with the desktop client. Further you need to be careful with the syntax - small issues like spaces without using qoutes or some special chars and so on could be lead to errors - helpful is therefore to use a log for the execute-statement to get error-messages. See here more examples of working solutions:

Re: Execute jar file on qmc

Re: How can I run a macro on QMC after reload?

Re: Run Excel from QMC

- Marcus

Anonymous
Not applicable

Did you ever find a solution?

lukas_sokol
Contributor II
Contributor II
Author

I found solution but I'm not using supporting tasks, but qmsedex app and this only works when you use IE plugin for AP.

I tried solution from:

Using EDX in QlikView 11

To achieve this:

  • put the QMSEDX.exe on server
  • in Qv document On User Preferences set - tab security set "Launch (Start Programs and DOcuments from Button, Scrip and Module)"

  • From the button that you creating in report add launch action

In application field select the path to QMSEDX.exe

In parameters field add- task,-qms  and -password  params:

   /// Commandline call:

qmsedx -task=name [-qms=qmsaddress] [-password=pwd] [-variablename=vname] [-variablevalues=vvalues] [-timeout=timeout] [-pollinterval=interval] [-verbosity=verbosity]          

    /// Arguments:

    ///     -task [REQUIRED]: The name or id of the task to execute.

    ///     -qms [OPTIONAL]: The address of the qms. Default is the local host.

    ///     -password (-pwd) [OPTIONAL]: The password required to execute the task, if set.

    ///     -variablename (-vn) [OPTIONAL]: The name of the variable to pass on to the task, if set.

    ///     -variablevalues (-vv) [OPTIONAL]: A semicolon separated list of values of the variable to pass on to the task.

    ///     -timeout (-to) [OPTIONAL]: How many seconds to wait for the task to finish. Default value is one minute.

    ///     -pollinterval (-pi) [OPTIONAL]: How often to check the status of the task. Default value is every five seconds.

    ///     -verbosity [OPTIONAL]: The level of output, 0-5. 0 will not produce any output and 5 is the most verbose. 

For example:

-task="Test - VAT register" -qms=http://YOURQVSERVER:4799/QMS/Service -password="testVATreload"

The EDX password must not be null. Use an empty string, if no password is configured.


  • In Qlik view managment console, when you defined triggers for task you must select “On an external event”


Functionality is available only for IE plugin, so if you  don’t have it  you can download this on access point