AddTriggerTimer

Metreos.Providers.TimerFacility.AddTriggerTimer

Summary

AddTriggerTimer will set a timer which will attempt to trigger a new script when fired.

Usage

AddTriggerTimer is used to cause another script to initiate after a set amount of time.

You can cancel an outstanding timer with the RemoveTimer action.

AddTriggerTimer and AddNonTriggerTimer offer the same feature from the perspective that both provide a means to set a timer. The difference is that one action creates a triggering timer, and the other creates a non-triggering timer. Because script instances are a licensable resource and should be managed closely, it may make more sense to end the application that set the timer, and so a triggering timer is required. Ultimately it is up to the developer of the script to determine which is the best fit.

Remarks

The Timer Provider stores timers only in memory. If the provider is disabled, or if the Cisco Unified Application Server service is restarted, all outstanding timers will be lost.

If the timer results in a no handler, then the Timer Provider will remove the timer automatically.

Action Parameters
Parameter Name.NET TypeDefaultDescription
TimeoutSystem.Int32The Timeout property specifies to the Application Runtime Environment how long to wait for a response from the provider for the current action. The ReturnValue returned in this case is Timeout. The value must be a literal value in milliseconds.
TimerDateTime *System.DateTimeThe initial time to fire the TimerFire event. This value must be in a .NET Framework System.DateTime parseable string or a .NET System.DateTime object. As an example of specifying the DateTime object, one can set a timer that will fire 5 seconds from the moment the AddTriggerTimer action is used by using the following C# snippet: System.DateTime.Now.AddSeconds(5).
TimerRecurrenceIntervalSystem.TimeSpanIf specified, this timer will reoccur indefinitely until the timer is removed via RemoveTimer. This action parameter sets the value of the period of the timer that will be applied to this timer after the first occurrence of the timer occurs. This value must be in a .NET System.TimeSpan parseable string. As an example of specifying a TimeSpan of 5 minutes, the following C# snippet could be used: System.TimeSpan.FromMinutes(5). If this parameter is not specified, then the timer will only be fired once.
TimerUserData *System.StringAn opaque token used to allow distinguishable timer events to be raised. The value specified here will be sent back in the TimerFire event as an event parameter. For the triggering timer, a best practice is to specifiy a well-known value for this field so that the administrator of the Cisco Unified Application Server can set this value as a trigger parameter on the other TimerFire script associated with the application.
Result Data
Parameter Name.NET TypeDescription
TimerIdSystem.StringThe ID of the timer, which is generated by the Timer Provider. This value can be used later to cancel the timer with the RemoveTimer action.

Branch Conditions 

Success

No description.

Failure

No description.

Timeout

No description.