Index: trunk/grails-app/conf/Config.groovy
===================================================================
--- trunk/grails-app/conf/Config.groovy	(revision 578)
+++ trunk/grails-app/conf/Config.groovy	(revision 579)
@@ -93,9 +93,11 @@
     warn   'org.mortbay.log' // Jetty
 
-    error "grails.app" // Set the default log level for our app code.
-    info "grails.app.bootstrap" // Set the log level per type and per type.class
-    error "grails.app.service.AuthService"
-    error "grails.app.service.NavigationService"
-    error "grails.app.service.com.zeddware.grails.plugins.filterpane.FilterService"
+    error 'grails.app' // Set the default log level for our app code.
+    info 'grails.app.bootstrap' // Set the log level per type and per type.class
+    error 'grails.app.service.AuthService'
+    error 'grails.app.service.NavigationService'
+    error 'grails.app.service.com.zeddware.grails.plugins.filterpane.FilterService'
+    error 'grails.app.task' // Quartz jobs.
+    info 'grails.app.task.InventoryReindexJob'
 
     // Move anything that should behave differently into this section.
@@ -108,6 +110,6 @@
             }
             //debug "org.hibernate.SQL"
-            debug "grails.app.service"
-            debug "grails.app.controller"
+            debug 'grails.app.service'
+            debug 'grails.app.controller'
             break
         case 'test':
@@ -117,6 +119,6 @@
                 additivity = true
             }
-            debug "grails.app.service"
-            debug "grails.app.controller"
+            debug 'grails.app.service'
+            debug 'grails.app.controller'
             break
         case 'production':
@@ -126,10 +128,10 @@
                 additivity = true
             }
-            warn "grails.app.service"
-            warn "grails.app.controller"
-            debug "grails.app.service.AssetCsvService"
-            debug "grails.app.service.PersonCsvService"
-            debug "grails.app.service.InventoryCsvService"
-            debug "grails.app.service.AssetTreeService" /// @todo: remove after testing.
+            warn 'grails.app.service'
+            warn 'grails.app.controller'
+            debug 'grails.app.service.AssetCsvService'
+            debug 'grails.app.service.PersonCsvService'
+            debug 'grails.app.service.InventoryCsvService'
+            debug 'grails.app.service.AssetTreeService' /// @todo: remove after testing.
             break
     }
Index: trunk/grails-app/jobs/InventoryReindexJob.groovy
===================================================================
--- trunk/grails-app/jobs/InventoryReindexJob.groovy	(revision 579)
+++ trunk/grails-app/jobs/InventoryReindexJob.groovy	(revision 579)
@@ -0,0 +1,34 @@
+import org.codehaus.groovy.grails.commons.*
+
+/**
+* Provides a quartz job that reindex's the Lucene index for the Inventory domain class.
+* With concurrent=false the repeat interval starts after the previous job completes.
+* We need a hibernate session otherwise we get a LazyInitializationException, default is true but we specify it to be sure.
+*/
+class InventoryReindexJob {
+
+    def concurrent = false
+    def sessionRequired = true
+
+    static triggers = {
+        // Cron fields:
+        // 'Seconds Minutes Hours DOM Month DOW Year(Optional)'
+        // See: http://www.quartz-scheduler.org/docs/tutorials/crontrigger.html
+        // Trigger every hour on the hour:
+        cron name: 'RebuildInventoryIndex', cronExpression: "0 0 * * * ?"
+    }
+
+    def execute() {
+
+        // Some information can be accessed if we run with "def execute(context) ".
+        // For more info see: http://quartz.sourceforge.net/javadoc/org/quartz/JobExecutionContext.html
+        // log.debug context.getTrigger()
+        // log.debug context.getPreviousFireTime()
+        // log.debug context.getFireTime()
+
+        // Reindex the Inventory domain class.
+        log.info "Rebuilding Lucene index, Inventory.reindex()."
+        InventoryItem.reindex()
+        log.info "Rebuilding Lucene index, complete."
+    }
+}
