Skip navigation
Currently Being Moderated

How to Create ColdFusion Uptime Monitor Script?

Mar 26, 2012 5:14 PM

Tags: #coldfusion #cf7

I need some help with creating a simple site status (uptime/downtime)  monitor script in ColdFusion. 


My guess it can be done using cfschedule, but I am not knowledgeable with that so I would really appreciate any help.


Basically I would like the script to check if an application on my site (  is accessible or not 60 minutes. If the application is down in that 60 minutes, then I am sent an e-mail to


Can anybody please help me with this? I am using ColdFusion 7.


Thank you


  • Currently Being Moderated
    Mar 27, 2012 4:59 AM   in reply to mikesorako

    We do something similar, but we are monitoring the server, not just one app.


    From another server we have a scheduled job that runs every two minutes.  It uses cftry/cfcatch.  The try block has a cfhttp tag with a very short timeout.  The catch block has the notification code.

    Mark as:
  • Currently Being Moderated
    Mar 27, 2012 6:18 AM   in reply to mikesorako

    You could indeed use cfschedule. However, checking whether an application is up or down isn't a trivial matter. Parts of the application may be down, whereas others are up.


    This means that your notification script should emulate a selection of the essential activities of the application. Also, it should be light in its consumption of resources. Otherwise, it may itself become the reason the application goes down.


    For example, suppose your application validates certain important variables, reads from and writes to the database. Then the notification script could run a test query(returning just 1 row) on each vital database table, and cflog the current values of the important variables.


    <cfschedule action = "update"

        task = "TaskName" 

        operation = "HTTPRequest"

        url = ""

        startDate = "#createdate(2012,3,27)#"

        startTime = "08:00 AM"

        interval = "3600"

        requestTimeOut = "600">

    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points