For a small number of facts representing future actions a rule with a timer would provide a generic solution. But timers have static literal durations, which means that you need to let it fire repeatedly, and test its due-time in the consequence. (You could devise more efficient but also more elaborate ways involving more than one checking rule with increasing granularities.)<br>
<br>However, I think that using a simple (Java) timer that inserts an &quot;IsDue&quot; fact for each timed fact whenever its due-time arrives would also be a good solution. And if you need to handle a large number, data structures such as a Binary Heap Queue provide a good way of managing the queue of all future actions.<br>
<br>-W<br><br><br><div class="gmail_quote">On 5 May 2011 23:16, kkelleyjr <span dir="ltr">&lt;<a href="mailto:karl.kelley.jr@gmail.com">karl.kelley.jr@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I do not intend on hijacking your thread, but I have a very similar question<br>
that maybe I can get some insight from this thread...<br>
<br>
How would one write a rule that generically checks the current time against<br>
a time in a fact. When the current time and the time in the fact are equal<br>
the rule fires?<br>
<br>
Is this another case where a timer must be used or the calendar? Is there<br>
some other way to do this?<br>
<font color="#888888"><br>
<br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/rules-users-Firing-the-rule-at-the-basis-of-time-tp2889494p2905548.html" target="_blank">http://drools.46999.n3.nabble.com/rules-users-Firing-the-rule-at-the-basis-of-time-tp2889494p2905548.html</a><br>

Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</font></blockquote></div><br>