<br><div class="gmail_quote">On Tue, Feb 26, 2008 at 11:54 AM, George Adams &lt;<a href="mailto:g_adams27@hotmail.com">g_adams27@hotmail.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

1) All 4 of these scripts say &quot;This script is meant to be run nightly out of cron&quot;. &nbsp;Which of these should I actually setup to run nightly?</blockquote><div><br>Probably you want cronjobs/fines2.pl<br><br>Schedule only one of these scripts nightly, of course.&nbsp; Running multiple scripts will trigger multiple fines.<br>
&nbsp;<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
2) Why is a cronjob even necessary? &nbsp;i.e. why can&#39;t Koha look at today&#39;s date and the books&#39; due dates, then calculate on the fly what the overdue fines are whenever the patron or librarian pulls up<br>
a record within the OPAC?<br></blockquote></div><br>The performance of such an implementation would be at a disadvantage.&nbsp; The fines rules can be somewhat complex with inheritance of defaults based on item category.&nbsp;&nbsp; You would need to recalculate possible fines for each of a patron&#39;s checked out items on each of their subsequent transactions.&nbsp; You wouldn&#39;t know whether a patron was able to check out anything until you completed this computation.&nbsp; <br>
<br>How would you handle an arbitrary fine (for usage, new library card, services, etc.)? or the overdue fine after the item is returned?&nbsp; Clearly you would need a populate fine table anyway, but it isn&#39;t authoritative.&nbsp; On each of your transactions, you&#39;d already be doing the fines query that Koha normally does, and then going on to compute &quot;on the fly&quot; for each of the checked out items.&nbsp; Both the logic and the performance of fines accounting are compromised in this model.<br>
<br>Then what would a library do if they wanted to send notices about overdue fines?&nbsp; They would have to pick a time to process all the checked out items, determine the amount of fines, combine them with the partial fines table, send or print messages, etc.&nbsp; You can see that the nightly fines cron task functions as a subset of this.&nbsp; <br>
<br>As for Koha&#39;s logic, the nightly cron job preserves the authoritative nature of the fines table.&nbsp; <br><br>--joe atzberger<br>