[Example] Automate a Script with a Reaction
In this example, we will configure Desigo CC to automatically start a certain script, on Saturdays at 8 am. To do this, you will configure a reaction that invokes that script at the specified time. For background information about reactions and related conditions, see Reactions and Time and Organization Mode Conditions in Triggers and Filters.
- The reaction license is installed.
- The script that you want to automate is enabled for the execution.
- System Manager is in Engineering mode.
- Select Applications > Logics > Reactions.
- The Reaction Editor tab displays.
Set the When the Script is Invoked
- In 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.
- In the Effective Days column:
a. Open the drop-down list and set Recurrence: Weekly.
b. Select the frequency Every: 1 week.
c. Clear the check boxes for all days except Saturday.
- In the Time column:
a. Clear the Begin of day check box.
b. In the Set Start Time field, enter 08:00:00 AM.
c. Clear the Set End Time check box.
Select the Script to Invoke
- In the Output expander, open the Action expander.
- In System Browser, select the Manual navigation check box.
- Select Applications > Logics > Scripts.
- Drag the script into the empty area of the Scope/Target column in the Action expander.
- The Action expander displays a new instruction (row) that invokes the script.
- Configure the other fields in the row: set Property to Status and Command to Start.
Save the Reaction
- Open the General Settings expander.
- In the Notes field, enter a description (for example, Automatically start the script every Saturday morning at 8 am).
- 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 Script.
b. Click OK.
- The script is now automated and will start based on when the configured time-related conditions occur.