The command line API for QuerySurge is deprecated. We do recommend switching existing API calls to the REST API. Information on our REST API can be found here
Scheduling QuerySurge with the Windows Scheduler and the QuerySurge Base API
QuerySurge teams often have the need to drive QuerySurge executions according to a regular ongoing schedule. The easiest way to set this up is to use the QuerySurge Base API with your scheduling tool. You can set this up with a commercial scheduler, the Windows Scheduler or a Linux cron job. In this article, we show the setup with the Windows Scheduler.
Pre-requisite: Install the QuerySurge Base API
The QuerySurge Base API needs to be installed on a box where the scheduler is active. This may be a box that the scheduler is on (in this article, it is) or on a box with a scheduler agent. Installation is done from your QuerySurge Installer; select the Command Line API option and make sure to deselect the other options.
Full installation instructions are available in this article.
Pre-requisite: Create a Script to Schedule
You'll need a set of command-line calls specifying what you want to execute on your schedule - an API script of the execution steps. When you install the Base API, the install path will contain some sample batch scripts. You can find discussions of these samples here (Windows batch). You can use these sample batch files to see how to put together your own scripts.
Set Up the Windows Scheduler to Schedule QuerySurge
- Click on the Windows start icon in the bottom left corner and search for "Task Scheduler". The Task Scheduler should launch.
- On the Actions panel, at the right of the Task Scheduler window, click on "Create Basic Task...".
The Create Basic Task Wizard will launch.
- In the Create Basic Task Wizard, enter a descriptive name of the task, as well as an optional description of what the task will be doing.
Click Next.
-
Trigger will be selected automatically. Click Select the frequency you would like for the task to be executed. Click Next.
- Adjust settings to reflect when the job should run. Then, click Next.
Note that these options will change, depending on what you selected in step (4).
- Select Start a program and then click Next.
- Click on the Browse button to select the location of your batch file. If there are additional arguments needed for the file you can enter them in this window. Click Next.
- Click Finish.
In order to minimize errors when running, select the newly created task from the Task Scheduler Library on the main Task Scheduler window. Under Security Options check the box for Run with highest privileges.
Comments
0 comments
Article is closed for comments.