KB-27495: Executing a script after a certain time interval

Question:

How can I set up a script to be executed after a certain time interval?

Solution:

To do so, follow these procedures:

  1. Insert a Timer Tag;
  2. Set the Enable property to False;
  3. Set the TriggerType property to Continuous;
  4. Set the RepeatInterval with the necessary time value;
  5. Create a script to enable the Timer Tag, for example: Application.GetObject(“Data.TstTimer”).Enabled = True
  6. In the Timer Tag’s OnPreset event, create the script to be executed when enabling the tag. To prevent this event from being indefinitely repeated, disable the Enable property (by setting it to False) at the end of the script.
Print Friendly, PDF & Email

Este artigo foi útil? Was this helpful?

Classificação média - Average rating 0 / 5. Count: 0

Deixe seu Comentário

Seu endereço de e-mail não será publicado. Campos marcados com asterisco são obrigatórios *