Using Task Scheduler and a Batch File
Overview
One alternative to using AlwaysUp for purposes of maintaining the Internet Controller is to use a batch file that is started on Windows login by the Windows Task Scheduler. The batch file is then designed to check every 15 seconds that DB Precision is running and will restart the application on reboot or application failure (rare) if it is not running.

Alternatively, to keep DB Precision running on the Internet Controller Server, you can either use a third-party product called AlwaysUp (click here for instructions), or a Windows PowerShell script, a batch file, and Windows Task Scheduler (click here for instructions).
Implementation Steps
  • Create Windows User for Controller: make sure the Windows User is not a Service Account User and has licensed access to Microsoft Office (Word and Excel). This is most easily done by logging in to the account an then opening each, making sure that you can open a document for both Word and Excel.
  • Create Batch File: create a text file in Notepad, copy the following, and save as a batch file named StartDBP.bat. Move this batch file to the application folder (c:\program files\pensionsoft\db precision).

    ECHO OFF

    SET DBPName=pension.exe
    SET DBPFullPath=C:\Program Files\PensionSoft\DB Precision\pension.exe

    :LoopStart

    TASKLIST | FINDSTR /I "%DBPName%"
    IF ERRORLEVEL 1 GOTO :StartDBP
    GOTO :LoopWait

    :StartDBP
    START "" "%DBPFullPath%"

    :LoopWait
    timeout /t 15 /nobreak
    GOTO :LoopStart

  • Open Windows Task Scheduler: from the Windows Start Menu, search for Task Scheduler and then open the program when located.

  • Create a New Task: Select "Create Task" under the Actions menu and then, assign a name to the task ("Start DBP" for example) along with a description ("Check every 15 seconds to ensure DB Precision is running" for example).





  • Specify Trigger: Select the Triggers tab at the top of the window and then press the "New" button. Use the dropdown menu at the top to select that the trigger "At log on".





    Specify Action: Select the Actions tab at the top of the window and then press the "New" button. Use the dropdown to select that the action is to "Start a program", and click "Browse" to navigate to the created batch file.





  • Additional Options: continue by selecting the "Conditions" tab, and uncheck any boxes under "Power". Next, select the "Settings" tab and uncheck the boxes about how long the task is allowed to run and ending the task. Finally, select "Ok" to create the task.





  • DB Precision Configuration: open DB Precision on the controller account and log in by entering the user ID and password for the Internet Controller user account. Make sure to check the box "Do not show this screen on startup" and then press OK.



  • Windows Auto-login: Configure the Windows Operating System to automatically log in to the controller's Windows User Account on machine startup. Steps for doing this vary by operating system version.
  • Test the Configuration: Restart your server making sure that DB Precision opens and that users can both login as well as complete calculations on the portal (ensures that both Office and all drive access/mappings are properly configured).

DB Precision Updates
With each new DB Precision release, this process keeping DB Precision always running will need to be temporarily stopped to allow for the update of DB Precision. To do this, please do the following:
  • Open Windows Task Manager: open Windows Task Manager by searching for this in Windows Start.
  • Stop the Batch File: on the Details tab, select cmd.exe and press the End Task button.
  • Stop DB Precision: still on the Details tab, select pension.exe and press the End Task button.
  • Update DB Precision: update DB Precision by copying the files indicated in the release notes or by running an updated setup file.
  • Open Windows Task Scheduler: from the Windows Start Menu, search for Task Scheduler and then open the program when located.
  • Restart Batch Process: right-click the task created above (Start DBP) and select Run from the resulting menu.

Prior Next
PensionSoft Corporation | 860.540.3690 | support@pensionsoft.com