Hi Devyani,<br><br>You might have problems with the date format due to your system&#39;s settings. There&#39;s the following remark in Drools 4 documentation:<br><blockquote style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote">
<h6 class="title"><font size="2">Date</font></h6><p>The date format &quot;dd-mmm-yyyy&quot; is supported by default. You
              can customize this by providing an alternative date format mask
              as a System property (&quot;drools.dateformat&quot; is the name of the
              property). If more control is required, use the inline-eval
              constraint.</p></blockquote>The best thing is to set that system property to the exact format you want to use. Something like this:<br><br><blockquote style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote">
System.setProperty(&quot;drools.dateformat&quot;, &quot;dd-mmm-yyyy hh:mm&quot;);<br></blockquote><div><br>-- <br><br>I believe, that date-effective will simply check the system time before firing a rule and, if the current time is before the specified time in the rule, it won&#39;t fire the rule.<br>
<br>AFAIK, you can&#39;t make a rule be triggered at a certain time everyday, except if you insert at that specified time a fact (or a set of facts) that will make that rule fire.. <br><br>Leo Gomes.<br></div><br><br><div class="gmail_quote">
2010/9/29  <span dir="ltr">&lt;<a href="mailto:devyani.sapre@wipro.com">devyani.sapre@wipro.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">




<div>
<div><font face="Arial" size="2"><span>Hi All 
</span></font></div>
<div><font face="Arial" size="2"><span></span></font> </div>
<div><font face="Arial" size="2"><span>I am using 4.0. I 
have a requirement to execute a rule only during a specified time of a given 
day</span></font></div>
<div><font face="Arial" size="2"><span></span></font> </div>
<div><font face="Arial" size="2"><span>While going through 
the documentation I found that I could use the date-effective attribute to 
specify the date and time</span></font></div>
<div><font face="Arial" size="2"><span></span></font> </div>
<div><font size="2"><span>
<div lang="en">
<div>
<div>
<div>
<h4><a name="12b5c1f7b169074e_d0e3110"></a><i><font face="Arial">6.5.1.8. date-effective</font></i></h4></div></div></div>
<p><i><font face="Arial">default value : N/A</font></i></p>
<p><i><font face="Arial">type : String, which contains a Date/Time 
definition</font></i></p>
<p><i><font face="Arial">A rule can only activate if the current date and time is 
after date-effective attribute.</font></i></p>
<p><span><font face="Arial">But while trying out the 
same, the engine recognizes only the day and not the time. How do I specify the 
time? So far I have been using the std format HH:MM:SS , tried both 12-hr and 24 
-hr format but no luck. Please help.</font></span></p>
<p><span><font face="Arial">Also, I would like to know 
how can I make a rule run on a specified time everyday. With date-effective 
specifying a date would be mandatory? Is thr a way or I need to put that in the 
rule condition part.</font></span></p>
<p><span><font face="Arial"></font></span> </p>
<p><span><font face="Arial">Thanks</font></span></p>
<p><span><font face="Arial">Devyani</font></span></p></div></span></font></div><p><b><span style="font-size: 10pt; font-family: &quot;Palatino Linotype&quot;,&quot;serif&quot;; color: green;"> Please do not print this email unless it is absolutely necessary. </span></b><span></span></p>



<p> The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. </p>


<p>WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. </p>

<p>
<a href="http://www.wipro.com" target="_blank">www.wipro.com</a>
</p>
</div>
<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>
<br></blockquote></div><br>