Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

QlikView 10 - Trigger tasks via .bat file, command line, or PowerShell

My company uses a job scheduler called JAMS and we've have been trying to basically replace our Publisher (QEMC) tasks with JAMS jobs.  We use JAMS to execute PowerShell script - passing parameters to the script containing the path and filename of the QVW file and the command line arguments (usually just /r to Reload, Save, and Close, and sometimes /v if we need to pass a variable).

We've been successful with simple QVWs that are just QVD file builders, since they do not need to be distributed to the AccessPoint.  However, we have not been successful with "published" apps that need to be distributed to the AccessPoint, put in a particular category on the AccessPoint and have proper security applied so that only certain named users or members of certain Active Directory groups can see them on the AccessPoint.

We've been using JAMS to reload the QVWs and then using a Publisher (QEMC) task to rename the document, distribute to the AccessPoint, categorize, handle security, etc.  So we used to have a lot of "Reload and Distribute" Publisher tasks.  Now we have reload jobs scheduled in JAMS and Distribute tasks scheduled in Publisher.  This is not a great setup, particularly because Publisher doesn't "know" when a JAMS reload job has completed.  It's not bad for our apps that just need to be refreshed once per day.  For example, we can schedule the reload via JAMS at 5 AM and the Distribute task via Publisher at 5:15 AM (if we know that the reload always takes less than 15 minutes).  It becomes problematic for QVW files that need to be closer to real-time.  In those cases, we may have a chain of events in JAMS to incrementally reload new data, update QVD files and then reload the QVW.  But we don't always have a predictable duration for these processes, so we wind up just scheduling Publisher to distribute the QVW every 10 minutes or whatever.  Is there a way to trigger an existing QV10 Publisher (QEMC) task from a command line,  .bat file or PowerShell so that the documents only get distributed when we know the reload has completed?

The above would be a great next step, but ultimately we would like to be able to eliminate Publisher tasks altogether.  Does anyone know if you can use Powershell to do everything I've described?  We have reloads figured out and I'm sure Powershell can basically perform a Save-As to rename the document and save it to our AP Distribution folder (which would get it to the AccessPoint).  However, that puts the QVD document in a <Default> category and allows all users to see it.  If anyone has used PowerShell to put QVWs in a particular AccessPoint category and apply security, I would greatly appreciate some help (examples, sample code, etc.).

3 Replies
Not applicable
Author

I am interested in the exact same type of scenario.  Maybe a bump will help?

marcus_sommer

External triggering from tasks is possible with EDX: https://community.qlik.com/search.jspa?q=edx&type=document but I'm not sure if such above mentioned mixed-up task-trigger-scenario has an overall advantage.

- Marcus

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

Here is the VB Script file which you can use to run the task from command line.

Trigger EDX Qlikview 10

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!