Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
blocks:tasks [2019-05-12 19:56]
mattias [Property References]
blocks:tasks [2025-02-24 19:48] (current)
admin [Tasks and Expressions]
Line 33: Line 33:
 While the //Trigger// is the mere occurrence of the specified event (such as the time being 8:00 in the morning), the //Trigger Condition// can apply arbitrarily complex conditions on top of this event in order to decide whether to actually start the task. For instance, in the case of a time-of-day trigger, you can specify that it should only start the task if it's Saturday and a certain Block is playing on a particular Spot. While the //Trigger// is the mere occurrence of the specified event (such as the time being 8:00 in the morning), the //Trigger Condition// can apply arbitrarily complex conditions on top of this event in order to decide whether to actually start the task. For instance, in the case of a time-of-day trigger, you can specify that it should only start the task if it's Saturday and a certain Block is playing on a particular Spot.
  
-A //Trigger Condition// often uses the predefined variable named //trigger//, as in the example shown above. This variable is further described below under "Predefined Variables". You can, however, use any variable or system property in the condition.+A //Trigger Condition// often uses the predefined variable named //trigger//, as in the example shown above. This variable is further described below under "Predefined Variables". You can, however, use any system property in the condition.
  
 ===== JavaScript Expressions ===== ===== JavaScript Expressions =====
Line 232: Line 232:
  
   * If the triggering mode is “Time of Day”; it's a JavaScript Date object.   * If the triggering mode is “Time of Day”; it's a JavaScript Date object.
-  * If the triggering mode is “Property Change” it's a number, boolean or string containing the property’s new value.+  * For “Property Change” it's a number, booleanstring or other object indicating the property’s new state. 
 +  * For "Server Startup", the value of //trigger// is undefined.
  
 If no trigger is assigned to the task, the value of //trigger// is undefined, and should not be used. Note that //trigger// will contain the current value of the tasks trigger even if the task was started by other means, such as manually clicking the //play// arrow next to the task's name, or by setting the task's //running// property to true. If no trigger is assigned to the task, the value of //trigger// is undefined, and should not be used. Note that //trigger// will contain the current value of the tasks trigger even if the task was started by other means, such as manually clicking the //play// arrow next to the task's name, or by setting the task's //running// property to true.