Timeout | (Variant) Specifies when the item is released and thus when the onStep event is triggered (if it doesn't occur sooner by the Release method).
If it is the numeric value (of Integer, Long, Single, etc. type), then it means the number seconds after which to release the item (0=doesn't wait, -1=wait for infinite time).
The meaning of this value depends on setting of the "Type of item start" configurator on the "Sequencer" tab: If set the "0 = items start independently, each according to its timeout", then it is the time from calling Add method.
If set the "1 = items start chronologically, timeout is delay between them", then it is the time since releasing the last item. In this case the defined timeout must be less then or equal to 21 days (i.e. 1814400 seconds). Possible change of the computer time has no influence to the timeout of items, i.e. the number seconds is observed till the start.If it is the value of the Date type, then it is the date and time when to release the item. The Date type cannot be set if set the "1 = items start chronologically, timeout is delay between them". Possible change of the computer time has no influence to the absolute time of starting the items. The items are started in the set absolute time (according to the new time). For example, the item that had to be started in 14:00:00, is started in 14:00:00 of the new time. |
---|---|
Val1 | [optional] (Variant) 1st value of the item. This value can be set for the next usage in the onStep event. |
Val2 | [optional] (Variant) 2nd value of the item. The usage see Val1. |
Val3 | [optional] (Variant) 3rd value of the item. The usage see Val1. |
Val4 | [optional] (Variant) 4th value of the item. The usage see Val1. |
Val5 | [optional] (Variant) 5th value of the item. The usage see Val1. |
Params | [optional] (String) Additional parameters of the created item. If the Val4 parameter or Val5 parameter are used, then the last Params parameter is mandatory. see: Example1. Entries are in the KeyVal format, for example thread:main;.
"thread:xxx;" - Specifies the thread where the onStep event is triggered for this item. This option is relevant only if the PmaSequencer object uses the work thread (see the "Used thread" configurator), otherwise is ignored. The usage of this option see the PmaSequencer object and How to start selected scripts in another thread.
"pos:xxx;" - Specifies, whether the item is placed to the end or To the beginning of the queue. This option is relevant only if in the "Type of item start" configurator on the "Sequencer" tab "1 = items start chronologically, timeout is delay between them" is selected.
"timeout:xxx;" - Allows to set the meaning for the Timeout parameter. In the JavaScript language the data type Date does not exist, which is used to distinguish between timeout (TimeSpan) and date (DateTime).
|
var oSeq = pMe.Pm("/Sequencer");
var t, val1, val2, val3, val4, val5, params;
oSeq.Add(t);
oSeq.Add(t, val1);
oSeq.Add(t, val1, val2);
oSeq.Add(t, val1, val2, val3);
oSeq.Add(t, val1, val2, val3, params);
oSeq.Add(t, val1, val2, val3, val4, params);
oSeq.Add(t, val1, val2, val3, val4, val5, params);
var oSeq = pMe.Pm("/Sequencer");
oSeq.Add(10, "ID1");