Setting up a SQL Image Viewer export task in Windows Task Scheduler

SQL Image Viewer Professional Edition allows you to save your export tasks and run them unattended using the SQL Image Viewer command line interface.  This blog describes how to set up a Windows Task Scheduler recurring task to run SQL Image Viewer export tasks.

You must first set up and save an export settings file using the SQL Image Viewer GUI, described here.   Before setting up the export task in Task Scheduler, we should make sure that the export task can be ran successfully from the command prompt.

To do that, open a command prompt window and navigate to the folder where the SQL Image Viewer command line interface executable file (SQLImageViewerCmd.exe) is located.

Enter the command line interface file name, and provide the fully qualified export settings file name as the first parameter.  You must enclose the parameter in double quotes if it contains spaces.

Run the command and check that the export task ran successfully.

Now we can start up the Task Scheduler.  We will create a basic task in this example.

Enter a name and description for the task.

Select your required frequency to run the task, and the frequency settings on the subsequent page.

Select the Start a program action.

In the program settings window, enter the fully qualified file name to SQLImageViewerCmd.exe, enclosed in double quotes.  For the arguments, enter the fully qualified file name to the export settings file, enclosed in double quotes.  For the Start in value, enter the fully qualified folder name of the folder where SQLImageViewerCmd.exe is located, without the double quotes.

And you’re done.

You can run the task to check if everything has been set up correctly.

A log file is automatically created every time the SQL Image Viewer command line interface runs.  The folder where the logs are stored is displayed in the GUI:

You would inspect the log files if your export task no longer runs successfully.

Leave a Reply

Your email address will not be published. Required fields are marked *