On May 29, 2007, at 12:48 PM, Mrinal Khanvilkar wrote:

Hi,

Is there a way to generate a rule and firing it periodically?
for e.g.


There's a discussion of something like this in the FAQ, under "How do I make Jess run forever?":

http://herzberg.ca.sandia.gov/jess/FAQ.shtml#Q9

But I think what I'd recommend is to use the "implement" function to create a Runnable that calls a deffunction, and then use the Runnable with a java.util.Timer to have it called periodically.


(defrule rule1

fire after every time t

=>

someactions)

the predicates in this case is only going to be the time interval for which the rule is being fired.

thanks,
Mrinal

---------------------------------------------------------
Ernest Friedman-Hill
Advanced Software Research          Phone: (925) 294-2154
Sandia National Labs                FAX:   (925) 294-2234
PO Box 969, MS 9012                 [EMAIL PROTECTED]
Livermore, CA 94550                 http://www.jessrules.com

--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]
--------------------------------------------------------------------

Reply via email to