[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

  1. 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.
  1. Click the first row in the Time and Organization expander.
  1. 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.
  1. 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

  1. In the Output expander, open the Action expander.
  1. In System Browser, select the Manual navigation check box.
  1. Select Applications > Logics > Scripts.
  1. 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.
  1. Configure the other fields in the row: set Property to Status and Command to Start.

Save the Reaction

  1. Open the General Settings expander.
  1. In the Notes field, enter a description (for example, Automatically start the script every Saturday morning at 8 am).
  1. Click Save As .
  1. 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.