28 Replies Latest reply on Apr 22, 2012 11:42 PM by Adam Cameron.

    Make cfschedule run daily but random hours

    lovewebdev Level 1

      I'm running a cfschedule at "daily" intervals, but is there anyway to get it to execute at random hours not every 24th hour from when i initially set it to run?

       

      So say I set it daily, how can I get it execute on a random hour in the day as opposed to every 24th day?

       

      The same applies for monthly, how can I get it execute on a random day monthly as opposed to every 30th day?

       

      my code now:

       

      <cfschedule action = "update"
          task = "sendit" 
          operation = "HTTPRequest"
          url = "http://xyz.com/xyz/xyz.cfm"
          startDate = "#DateFormat(now(),'mmmm, dd, yyyy')#"
          startTime = "#TIMEFORMAT(now(),'hh:mm:ss')#"
          interval = "daily"
          resolveURL = "Yes"
          requestTimeOut = "600">
      

       

       

      Thanks!