The CFRESTART program can be run (using the first form of the above command line) to signal to COPIAFACTS (on the same or another node) that it should shut down and restart. It can be used even if you do not have access to the console of the node on which COPIAFACTS is running.
The required command-line parameter is the CopiaFacts nodename of the node on which the COPIAFACTS engine is to be closed down.
The shutdown is effected by writing a file nodename.RESTART (e.g. M1.RESTART) into the FAXFACTS folder. The engine on the named node uses the presence of this file to initiate a 'controlled shutdown' (allowing existing transactions to complete) and then restart. The file is deleted after it has been used, or on restarting COPIAFACTS if the shutdown is incomplete for any reason.
In the unlikely event that COPIAFACTS has completely locked up, the .RESTART file may not be read and the restart will fail. In a command file, the presence of the .RESTART file more than a couple of minutes after running CFRESTART will confirm that the restart has failed. CFRESTART will also not start COPIAFACTS if it is not already running.
For internal use only, the CFRESTART program is also used (using the second form of the above command-line) in the process of restarting COPIAFACTS and must be present in the Program Files\Copia folder of a node which is being restarted. In this case, the program is executed by COPIAFACTS, waits for the COPIAFACTS process to end, and then starts a new instance of COPIAFACTS. Note that when used in this way, CFRESTART does not refresh the Windows environment for the COPIAFACTS application.
To shut down and restart COPIAFACTS on node M2:
To shut down and verify that the restart has been initiated, and reboot the machine if not:
IF NOT EXISTS "%FAXFACTSDIR%M2.RESTART" GOTO END