[rules-users] Cron Rule doesn't work

Mark Proctor mproctor at codehaus.org
Wed Jun 19 21:52:43 EDT 2013


try fireUntilHalt, or it won't be able to fire the events as they happen.

Mark
On 20 Jun 2013, at 02:04, Andy <reliable.android at gmail.com> wrote:

> *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.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users




More information about the rules-users mailing list