Qlik Community

QlikView Deployment

Discussion Board for collaboration related to QlikView Deployment.

swarup_malli
Valued Contributor

QMC Task doesn't execute after trying to trigger it from command promt?

Hello,

I have been doing a lot of research on how to trigger a task from command line using  a bat file .We are using QV Server version 11

Found the following topics:

1).http://poverconsulting.com/2014/05/21/command-line-statement-from-qv-publisher/#more-293

2) Using EDX in QlikView 11

3) EDX in QlikView: What are, what for and how it does ?

4) Using EDX in QlikView 11 - basic example

5) EDX on QV11

But none of them seem to help me accomplish my objective.

I've been trying to trigger a task from command promt .This is the command I'm using the following code:

"C:\Program Files\QlikView\Qv.exe" /r D:\QVSERVER\QVSOURCEDOCS\DEV\QVW_Extract\teb-Filename_Extract.qvw

When I try to execute the EDX, I see the extraction file reloading i.e it does run, but its not reloaded by the Qlikview server,thus the other successive tasks don't get triggered.

How do I trigger the tasks from the command line ?

I'm sure the task id must be passed as an argument  in the commandline .

Even tried tied to schedule the job using Task Scheduler,it still runs the extraction file but does not trigger it in QV server .

Thanks

SM

Labels (2)
1 Solution

Accepted Solutions

Re: Task doesn't execute after trying to trigger it from command promt?

Your examples are run using QlikView Desktop, not QlikView Server.

If you want to use EDX to trigger a reload using QlikView Server/QlikView Publisher, you have to first schedule a task in QMC to reload your document. The task should be triggered "on an external event". It will be just waiting for a signal. The trick is then to just fire that signal. You can use a command line tool for that purpose. Go have a look at QMSEDX Enhanced. Download and install QMSEDX. Next create a BAT/CMD file that makes a call to QMSEDX with the appropriate parameter values (including - as you said before - the task id). You should be up and running in only a few minutes.

Best,

Peter

6 Replies

Re: Task doesn't execute after trying to trigger it from command promt?

Your examples are run using QlikView Desktop, not QlikView Server.

If you want to use EDX to trigger a reload using QlikView Server/QlikView Publisher, you have to first schedule a task in QMC to reload your document. The task should be triggered "on an external event". It will be just waiting for a signal. The trick is then to just fire that signal. You can use a command line tool for that purpose. Go have a look at QMSEDX Enhanced. Download and install QMSEDX. Next create a BAT/CMD file that makes a call to QMSEDX with the appropriate parameter values (including - as you said before - the task id). You should be up and running in only a few minutes.

Best,

Peter

swarup_malli
Valued Contributor

Re: Task doesn't execute after trying to trigger it from command promt?

Thank you Peter

After going through various posts, One part that I get not get is ..they all suggest to create a user for this purpose( i.e trigger jobs)

What I did not understand is

1) Why create a separate user for triggering from command line.

2) after creating a user, how do I pass the username related parameters or arguments via command line

What the sole purpose of creating a user on QVS for this task ?

Re: Task doesn't execute after trying to trigger it from command promt?

The purpose of creating a user is not to pass the account to the QDS to trigger the task (indeed, there is no method to pass a username, only a password) but to grant a specific AD user the right to trigger a task without communicating the service account and password to all corners of your company, or any other QlikView Administrator account for that matter. You do not want to make these accounts public, since they are privileged accounts.

Just create a new user that is allowed to trigger this specific task (because of having the right password) and that is a member of the special EDX QlikView group. QlikView management security remains (resonably) tight that way.

Best,

Peter

swarup_malli
Valued Contributor

Re: Task doesn't execute  after trying to trigger it from command promt?

Thank you Peter, had one question

I did not understand

"Just create a new user that is allowed to trigger this specific task (because of having the right password) and that is a member of the special EDX QlikView group."

Anyone who has access to the server machine(with QVS installed) can start a task.

So how do I allow a user to trigger a task when he doesn't have access to the QV server ?

Re: Task doesn't execute after trying to trigger it from command promt?

It's not really true that anyone with access to the server platform can start a task. There are more ways to start a task, but the two basic methods are:

  1. Via the QMC. This is a web application that can be opened in any browser on any computer in your network. No direct access to the server needed. You only need a user account that is a member of the local QlikView Administrators group
  2. Via EDX. This is a signaling method that makes use of the QlikView Management API. Reread my first post for a technique for triggering a task from the command line. Again from any computer in your network. No direct server access needed.

Best,

Peter

swarup_malli
Valued Contributor

Re: QMC Task doesn't execute after trying to trigger it from command promt?

I got the following errors:

error.png

2.png

The Operating system on the QV server :

Windows Server 2008 R2 datacenter,

64-bit OS

Perhaps I might have made syntactical errors while passing arguments, I'm pasting the code below:


=== QMSEDX 1.0.3 (patched by Excelcio) ===
The program is used to execute a single EDX task and wait for the result.


qmsedx -task="Testing  QVD Extract:AppName_QVD_Dev-Reload-Business Development"
[-qms="NameOfTheServer"] [-password="ServerLoginPassword"]

[-variablename=vname]

[-variablevalues=vvalues]

[-timeout=timeout]

[-pollinterval=interval]

[-nowait=true/false]

[-verbosity=verbosity]
Arguments:
  -task [REQUIRED]: The name or id of the task to execute.
  -qms [OPTIONAL]: The name 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 24 hours.
  -pollinterval (-pi) [OPTIONAL]: How often to check the status of the task. Default value is every five seconds.
  -nowait (-nw) [OPTIONAL]: Don't wait for task completion (not compatible with tasks chaining!)
  -verbosity [OPTIONAL]: The level of output, 0-5. 0 will not produce any output and 5 is the most verbose.



Community Browser