This example shows how to use PRSMon in conjunction with the Windows Task Scheduler program to carry out daily database compaction and backups.
This technique can also be used to perform scheduled Offline copying.
|•||First you must set the location for the saved backups and the number of most recent backups you wish to retain. To do this, open PRSMon and run the Tools->Options... menu command. For safety you should either backup to removable media or to another PC on your network a geographically separate location.|
|•||Next open the Windows Task Scheduler from the Control Panel.|
|•||Double-click the Add Scheduled Task item and work your way through the Scheduled Task Wizard (if you are using Microsoft Vista select the Create Basic Task... item from the Action menu)..|
|•||When the Scheduled Task Wizard asks for the program you wish to run, press the Browse... button and select prsmon.exe which you'll find in the PRS Client install folder (normally C:\Program Files\prsk2\).|
|•||On the last page of the Scheduled Task Wizard check the Open advanced properties for this task when I click Finish checkbox and append the /compactbackup command-line parameter to the prsmon.exe command (in the Run edit box).|
|•||Use the Task Scheduler's Advanced->View Log menu command to review executed tasks. The log records the program's exit code so you can check if there were any problems (see the Exit Codes table for details).|
|1.||The PRSMon command-line parameters are mutually exclusive (only use one at a time).|
|2.||If you have set a database password then use the /compact or /compactbackup command-line options you will be prompted to manually enter the database password. These options are therefore unsuitable for unattended execution when a database password is set.|
|3.||Close any open instances of PRSMon before running it from the command-line. Only one instance of PRSMon can run on a PC at once.|