OK I see,
2011/10/19 Fábio Costa <[email protected]>:
> src=switch(track_sensitive=true,single=[true,false],[({08h44},jingle),({true},default)])
This does not play the jingle often enough.
> src=switch(track_sensitive=true,single=[true,false],[({08h44-9h44},delay(3600,,jingle)),({true},default)])
This is a solution, but making the time predicate larger forces you to
add a delay, and the choice of one hour seems ad-hoc, there might not
be a sensible default in all cases.
Would this be a good specification of what you're trying to do: given
a time interval (in your example, 8h44 to 8h45) be ready to play the
source during the interval, but only once?
If so, it should be possible to do this as a script, writing a
function interval_once which takes something like {8h44} and a source,
and returns a pair (F,source) to be used in a switch list, where F is
a predicate that reads a flag (reference on a boolean): first it reads
the interval (obtaining in_interval), and unsets the flag if we're
outside the interval; then if the flag is not set it returns
in_interval, if the flag is set it returns false. In addition, wrap
the source in a on_track that sets the flag when a track starts
playing, and you should be close to done.
Tell me what you think,
David
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users