Skip to main content
Version: 6.0

Case Manager Server: Scheduled Tasks

Case Manager Scheduled Tasks Diagram

Windows Task Scheduler can be used to automate processes on the server. We recommend creating scheduled tasks for at least the database backup and the daily maintenance process. Additional processes may also be taken into consideration subject to relevance in your environment: such as the calculation of interest, merging of SMS templates (South African only), extension-specific processes, and custom processes and tasks.

To simplify passing the correct arguments to processes we suggest making use of Windows batch scripts initiating the relevant tasks with the correct arguments which can (then, more easily) be scheduled. We’ve included batch scripts in the CaseManagerTools folder for the database backups and the daily maintenance process:

  • DatabaseBackup.bat should be edited to specify the name of the instance to be backed up wherever <InstanceName> is mentioned. Note that if the instance name contains a space or special character, you should place the entire parameter in quotation marks, for example ... "-instance=Name With Space”
  • DailyMaintenance.bat should also be edited to specify the name of the instance on which the process should run wherever <InstanceName> is mentioned. The daily maintenance user and password should also be specified. This information can be obtained/set in the System Users action in User Management. Here as well if one of the arguments specified contains a space or special character, the entire argument must be placed in quotation marks, for example “-password=Some Password”.

We suggest the following settings when creating a new task in the Windows Task Scheduler:

  1. Enable “Run whether user is logged on or not”. This will require login details for a privileged user on the server.
  2. Enable “Run with highest privileges”
  3. When setting up the triggers,
    1. It is best to choose a time after hours when very little other work is performed on the database; also not during the same time that one of the other scheduled processes is run. It is not necessarily a problem if there is overlap. The performance of both processes however will be better if there is no overlap.
    2. You may stop the task if running for more than a day, or 12 hours.
  4. Specify running a batch script as the action of the task. This will simplify the setup when taking a couple of steps in the task, and when specifying the correct arguments to the process.
  5. In the settings, enable
    1. Allow task to be run on demand
    2. Run task as soon as possible, after a scheduled start is missed
    3. Do not start a new instance if the task is already running