Tech Tuesday: How to Restart the SmartConnect Scheduling Service Using a Batch File
Have you ever wanted to restart your SmartConnect scheduling service without having to manually go into services and restarting it? This week’s article will show you how to create scheduled task that runs a batch file to restart the SmartConnect scheduling service.
- On the machine where the SmartConnect schedule service is running, create a folder on the machine in the root of the c:\ drive and name it “batch”.
- Create a new file in the “batch” folder named restart.bat
- Edit the file with one of the below scripts depending on your SmartConnect version.
- SmartConnect 21+
- SmartConnect 2018
- Create a scheduled task by opening the Windows Task Scheduler in Administrative tools and clicking on create task.
- Give the task a name, I called mine “restart scheduler”. Tell it to run under an administrative user, and use the same user you have configured on the actual SmartConnect scheduling service. Make sure you select the options to “Run whether user is logged on or not”, and “Run with highest privileges”. Your General window should look like this when you are done.
- Next go to the Triggers tab and click on New. Pick a time to restart it, I picked 8:00 am, but you can pick any time when maps are not likely to be running. So for instance, if your scheduled maps are running from 8:00 am to 5:00 pm, you might want to restart it at say 7:00 am before the maps start running for the day, or 6:00 pm after the maps are done for the day. Make sure the task is enabled in this screen.
- Next go to the Actions tab, and click on New. Make sure the Action is set to “Start a program” and you have the full path to the batch file. You also need to have the path filled in on the “Start in” field
- Next go to the Conditions tab and make the window look like this:
- Next go to the Settings tab and make the settings window look like this:
- After creating the task, you will want to test it to make sure it will run. In the tasks window, right click on it and pick “Run” and the task will run immediately. After it runs, you should get a message that says “The operation completed successfully. (0x0)” as shown here.
Now your SmartConnect scheduling service will restart on a schedule without manual intervention.
Integrate & Automate without Any Code.
SmartList Data has Never Been Faster.
The Easiest Way to Report on GP Data.
Leave a Comment