title: I want to change the value of a domain model variable based on the current date
body: <p>I have created a domain model object called <strong>Report</strong> and gave it several variables such as: </p>
  
  <pre><code>Date dateCreated
  Boolean expired
  </code></pre>
  
  <p>I then create instances of the object like this:</p>
  
  <pre><code>def report = new Report(id: 1, dateCreated: currentDate, expired: false)
  </code></pre>
  
  <p>Saving these instances works fine, but I want to have the <code>expired</code> variable change to 'true' automatically once the <code>dateCreated</code> variable is 24 hours old. This really matters for the <code>report.gsp</code> site that I am working with but it seems like a bad practice to put an "if" loop inside of the .gsp if I can help it. I need to know where I should be triggering this event so that the new value for the expired variable persists.</p>