Windows example for smatdb cycle implementation
For this example, the site name is test_site. This site contains a process named test_process that has one thread named test_thread. This thread is set as to inbound and to outbound.
In Windows, the embedded task scheduler is used to finish the time-based smatdb cycle. To do this, you must have a basic knowledge of task scheduler setup.
You should maintain all task in a special bat file.
To do this, create a bat file named hcismatdbcycle.bat and edit it. For example:
@echo off
REM COPYRIGHT 2019 INFOR. ALL RIGHTS RESERVED.
>>C:\the\real\path\task_smatdb.log 2>&1 (
echo Cycle time: %date:~0,4%%date:~5,2%%date:~8,2%%time:~0,2%%time:~3,2%%time:~6,2%
call setroot
call hcismatcycle -s t -p smatdb2 -t conn_4 -b out -r C:\cloverleaf\cis19.1\integrator
call hcismatcycle -s tsmatdbCycle -p smatdb -t conn_2 -b out
...
)
On Windows, the scheduler task does not provide an output log. Instead, you can redirect the log to a location of your choice.
The scheduler task calls cmd.exe to run hcismatdbcycle.bat.
setroot requires administrator privilege.
You can use PowerShell to ensure setroot
was
successfully set in the bat file. This is
accomplished by running a command in cmd.exe
similar to:
$schtasks /create /sc minute /mo 1 /tn "smatdbCycle" /tr “powershell -Command Start-Process -Verb
RunAs C:\The\location\of\hcismatdbcycle.bat”