0 Replies Latest reply on Jul 20, 2006 6:45 AM by BosDog

    Caching queries w/ scheduled task

      Here is my problem... I need to cache a query everyday @ 6:00 am EST. My code looks like this for the scheduled task page but for some reason it is not caching in memory when I get in in the morning to work... would anyone know why that would be?

      <!--- Past Revenue query --->
      <cfobject component="/cached/past_rev" name="get_past_rev">
      <cfset application.get_rev = get_past_rev.get_past_rev(run_when:#CreateDateTime(Year(Now()),Month(Now()),Day(Now()),23 ,59,59)#)>

      And my component past_rev.cfc looks like this:

      <cffunction hint="Returns the past revenue query" access="remote" returntype="query" name="get_past_rev">

      <cfquery name="get_past_rev" datasource="rev">
      SELECT *
      FROM testing
      WHERE 1=1
      <cfreturn get_past_rev>