1) You could build a cron-like service by describing each
when/condition/task combination in a document and then having a
scheduled task that looks for these documents, runs their conditions,
and spawns the task if the condition is met. There are a few ways you
could design something like this, but the key bit is to use a scheduled
task to see which things should be run. Serialized queries and
reverse-query might come in handy as well.

2) yes


On Tue, 2009-11-10 at 12:43 -0800, Darin McBeath wrote:
> Assume that I have spawned a task to the TaskServer.
> 
> The spawned task checks for a 'condition'  If this 'condition' is
> true(), then the task will complete.
> 
> If the 'condition' is false(), the task will sleep for a specified
> interval (such as 15 seconds) and then will spawn a task to do
> basically the same check.  This process will continue until the
> 'condition' evaluates to true.
> 
> Couple of questions.
> 
> 1. Is there a better way of accomplishing the goal outlined above?
> The above appears to work but was curious if others had a better idea.
> 2. When you use xdmp:sleep within a task on the Task Server, are you
> still consuming one of the threads which are configured for the Task
> Server during this period of sleep time?  I wouldn't want to run into
> a situation where all of my configured threads are doing this
> 'condition' check instead of the real work.
> 
> Thanks.
> 
> Darin.
> 
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to