[Example] Creating a Reaction to Automatically Back Up the Project and History Database on Sunday Nights
Scenario: You want the system to automatically make a backup of the project and History Database every week, on Sundays at 10 pm. To do this, you will configure a reaction that invokes the predefined system macros Backup Online and Backup History at the specified time. For background information see Reactions and Macros.
- System Manager is in Engineering mode.
- In System Browser, select Application View.
- Select Applications > Logics > Reactions.
- The Reaction Editor tab displays.
- From the Triggers expander, open the Time and Organization Mode expander.
- The expander initially contains a single row with time and date set to Always.
- Click the first row in the Time and Organization expander and set its fields as follows:
a. In the Effective Days column, open the drop-down list and set Recurrence: Weekly, select the frequency Every: 1 week, and clear the check boxes for all days except Sunday.
b. In the Time column, clear the Begin of day check box, in the Set Start Time field enter 10:00:00 PM.
c. Clear the Set End Time check box.
- From Output expander, open the Action expander.
- In System Browser, select the Manual navigation check box.
- Select Applications > Logics > Macros > Backups.
- From the Backups folder, drag the Backup Online macro into the empty area of the Scope/Target column in the Action expander.
- The Action expander displays a new instruction (row) which invokes the Backup Online macro.
- From the Backups folder, drag the Backup History macro into the empty area of the Scope/Target column, underneath the previously added instruction.
- The Action expander displays a second new instruction (row) which invokes the Backup History macro.
- Open the General Settings expander.
- In the Notes field, enter: Automatically back up the project and history databases every Sunday night at 10 pm.
- Click Save As .
- In the Save Object As dialog box, select the main Reactions folder or any subfolder under it as the destination where you want to save this reaction:
a. In the Name field, enter Automatic Weekly Backup.
b. Click OK.
- The new reaction object is added to System Browser, and is enabled by default.