title: CFSchedule Does Not Work Twice, Looking for ColdFusion Downtime Checking Script
body: <p>I need some help with creating an automatic timing script with ColdFusion. Every 60 minutes I would like to see if a page on one of my servers (<a href="http://www.mysite.com/ALERT.cfm" rel="nofollow">http://www.mysite.com/ALERT.cfm</a>) is working or not.</p>
  
  <p>If the page is down when it is checked, then it will check again in 5 minutes to see if the page is back up. If it is not back up, then I am sent an e-mail to email@mysite.com. If it is back up, then no action is required and we start the 60 minute cycle check again.</p>
  
  <p>I now understand how to do one check, but not two.</p>
  
  <p>So here is the CFschedule code I am using</p>
  
  <pre><code>&lt;cfhttp url="http://example.com/testpagetocheck.cfm" method="get" &gt;
  &lt;cfif cfhttp.statusCode neq "200 OK"&gt;
  &lt;cfschedule action = "update"
  task = "TaskName" 
  operation = "HTTPRequest"
  url = "http://www.example.com/ALERT.cfm"
  startDate = "#createdate(2012,4,01)#"
  startTime = "08:00 AM"
  interval = "3600"
  requestTimeOut = "10"&gt;
  &lt;/cfif&gt;
  </code></pre>
  
  <p>So say I have 4 pages - the page I want to check to see if it is down or not (testpagetocheck.cfm), page1.cfm which has the above code, ALERT.cfm which has the cfmail to send me a message if testpagetocheck.cfm is down, and then page2.cfm has the above code again, but with an interval of "once" and a start time of 5 minutes from now. </p>
  
  <p>Page1.cfm to alertMe.cfm works like a charm. I am sent a message of the page being down. Page 2.cfm to alertMe.cfm also works beautifully. It also sends me a message the page I am checking is down. But, when I try to go from page1.cfm to page 2.cfm to alertMe.cfm, it does not seem like the cfschedule on page2.cfm is running so I end up not getting any mail when the server is dowm.</p>
  
  <p>Can anybody please tell me what I am doing wrong? I am using CF7</p>