Scheduling the Staging Area creation

From IMSMA Wiki
Jump to: navigation, search

The generation of an IMSMA staging area needs human interaction. However, there might be the requirement to re-generate the staging area regularly, in order to have an up-to-date reporting database. It is possible to automatize the staging area generation by following these steps:

  1. Take a decision on how the shutdown of the IMSMA server will be implemented.
  2. In the C:\IMSMAETLTool folder, create a .bat script named for example runStagingArea.bat with the following content:
    cd C:\IMSMAETLTool
    call bin\runnogui.bat
    
  3. Edit the properties file C:\IMSMAETLTool\conf\config.PROPERTIES by specifying the required values for all the parameters (they correspond to the ones from the graphical user interface described here). If a parameter should not be used, e.g. script_file, then comment it by placing a # at the beginning of the line:
    conversion_language=en
    gazetteer_sequence_level=0
    #script_file=scripfile.sql
    
  4. Schedule a task in an operating system's task scheduler. For example, using Windows 7, follow those steps:
    1. Go to Control Panel → Administrative Tools → Task Scheduler
    2. In the Task Scheduler interface, click on Create Basic Task...
    3. In the Create Basic Task Wizard, provide a name, e.g. Staging Area Generation and an optional description. Click Next.
    4. In the next window, specify the required recurrence (daily, weekly, etc.) and click Next.
    5. Next, refine recurrence criteria (e.g. time of the day) and click Next.
    6. In the next window, select Start a Program and click Next.
    7. Browser to the previously created script, e.g. C:\IMSMAETLTool\runStagingArea.bat. Click Next and then Finish.

The staging area generation should now start at the specified time.

SAGTaskScheduler.png

It is advised to plan the generation time carefully, i.e. best during the night when no one is accessing and entering data into IMSMANG, as this might lead to inconsistencies. Ideally, the IMSMA server should be stopped before the staging area generation and then restarted. It also needs to be assured that no one (and no automatic reporting process) is accessing the staging area database at the time it has to be re-created. As long as there are open connections to the database, it cannot be dropped and re-created. Contact your GICHD IM advisor in case of questions.