This article will go thru the steps of how to setup a scheduled restart of QlikView Server service in Windows Server 2008.
The same procedure can be applied to any service by changing the service name in the batch file.
Batch file
- Create a batch file including the following commands:
net stop QlikViewServer
net start QlikViewServer
Configure Windows Task
- Log into your server
- Navigate to Start > All Programs > Administrative Tools > Server Manager. This brings up the Server Manager interface
-
Drill down to Configuration > Task Scheduler
-
On the right hand side of the interface, click Create Basic Task… Give the task a name and description. Click Next
-
Select the radio button for how often the task should run: Daily, Weekly, Monthly, one time only, when the computer starts, when I log in, or when a specific event is logged. Click Next
-
Select a start time, how often to perform the task, and an end time. Click Next
-
Configure the task to start a program. Click Next
-
Browse to the script/.bat file created above and enter in any arguments or paths to start in. For example C:\Restarts\Schedule\QlikviewService.bat. Click Next
-
Select the checkbox for Open the Properties dialog for this task when I click Finish if you wish to configure the task further. Click Finish
-
The Advanced Properties window will appear. Configure the task further to your liking by adding comments to the task, telling the task when to run (only if logged in or otherwise), deleting the task after its run if it's scheduled to not run infinitely, to reschedule the task if it is missed, and so forth. After doing so, the task is setup and will run if configured properly