[rules-users] Cron Rule doesn't work

Andy reliable.android at gmail.com
Wed Jun 19 21:04:58 EDT 2013


*Issue 1*

Steps: 
1. Add a Rule with cron + when condition always true.
2. FireAllRules

Expected: Cron to fire every 15 seconds

Rule:
"
rule "Rule 123" dialect "mvel"
timer (cron:0/15 * * * * ?)
when
  eval(true)
then
  System.out.println("Fired!");
end
"

Other Details:
"
    ...(initialized kagent using changeset)
		kbase = kagent.getKnowledgeBase();
		ksession = kbase.newStatefulKnowledgeSession();
		ksession.fireAllRules();
"

The same rule works fine when I insert some object.

*Issue 2*
Inserting some object and then adding a second cron makes the previous cron
fire twice, then thrice and so on...

Is statefulknowledge session right choice for me?
Are there any known issues with cron rules?

Any help/advice is appreciated. Thx!



--
View this message in context: http://drools.46999.n3.nabble.com/Cron-Rule-doesn-t-work-tp4024399.html
Sent from the Drools: User forum mailing list archive at Nabble.com.


More information about the rules-users mailing list