Originally published on 07-21-2011 04:36 AM
The Windows Task Scheduler is an administrative tool that can be used to perform actions at a specific time or when a certain event occurs. Therefore, it can be used to schedule repeated executions of an Expressor Dataflow. Whenever a triggering event occurs, the task scheduler will run a specified program, which can be a batch file that starts the execution of an expressor dataflow.
When the Expressor Data Processing Engine is installed, it does not modify the system PATH or create other environment variables. One of the programs installed with the Expressor Engine is Expressor.Launcher.exe, which sets the environment then performs some other action, such as opening a command window or running another program. You will configure the Windows Task Scheduler to run this program, which in turn will run your dataflow.
Before trying to set up a scheduled task, review the knowledge base articles Deploying a QlikView Expressor Project and Running a QlikView Expressor Dataflow from a Command Window.
What you will need to do is write a simple batch file that includes the etask command with the -x -p -V and -D command line arguments. The task scheduler will execute this batch file, which in turn will run your dataflow.
Let’s assume that the directory structure of your deployment package, named DeploymentPackage1, is located in the directory C:\MyApps.
To run Dataflow1, you would use the following etask command.
etask -x Dataflow1 -p Project1 -V 0 -D C:\MyApps\DeploymentPackage1
This is the statement that you must copy into a batch file, which you then save to any convenient file system location. For example, let’s assume that you saved the file using the name runDataFlow1.bat in the C:\MyScripts directory.
Now you are ready to configure the task scheduler.
Select the Start > Control Panel > Administrative Tools > Task Scheduler menu item to start the Windows Task Scheduler. In the right-hand Actions panel, click the Create Basic Task… link to start the Create Basic Task Wizard.
- In the first page, give your task a meaningful name and provide a description.
- In the second page, set the trigger event by selecting how frequently you want this task to execute. If you select Daily, Weekly, Monthly, or One time, a following page will ask you to set the day and/or time.
- Then in the third page, select the Start a program radio button.
- Finally, assuming you selected the default expressor installation directory onto a Windows 2008, 64 bit server, enter (with the quotation marks) into the Program/script text box
"C:\Program Files (x86)\expressor\expressor3\Studio\Expressor.Launcher.exe"
and into the Add arguments text box enter
Once you have created the scheduled task, it will be listed in the main window of the Windows Task Scheduler GUI. To test your scheduled task, select the task, and in the Selected Items panel click Run.
Now your dataflow will run whenever the trigger event occurs.