ColdFusion Downtime Check Script

  • Thread starter webdivx
  • Start date
In summary, the conversation discusses the need for a simple and automatic site status monitor script in ColdFusion. The script should check the accessibility of an application every 60 minutes and send an email if it is down. The script will continue to check indefinitely without the user having to keep the page open. A basic script is provided, with instructions on how to update the variables for individual use.
  • #1
webdivx
16
0
I need some help with creating a simple, but automatic site status (uptime/downtime) monitor script in ColdFusion.

Basically I would like the script to check if an application on my site (https://www.mysite.com/application) is accessible or not every 60 minutes. If the application is down at 60 minutes, then I am sent an e-mail to email@mysite.com.

If the application is working, then the script will check again in 60 minute to see if the application is up or not. And this cycle continues indefinitely without me having to have the page open.

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

Thank you
Mike
 
Technology news on Phys.org
  • #2
Here is a basic script that you can use to monitor the uptime of your application. You will need to update the variables at the top with the appropriate values for your site. <cfset websiteURL = "https://www.mysite.com/application"><cfset checkInterval = 60><cfset emailAddress = "email@mysite.com"><cffunction name="checkUptime" returnType="void" output="false"> <cfhttp url="#websiteURL#" method="get" result="result"></cfhttp> <cfif result.statusCode NEQ 200> <cfmail to="#emailAddress#" from="#emailAddress#" subject="Website Down" type="html"> <p>The website <a href="#websiteURL#">#websiteURL#</a> is down.</p> </cfmail> </cfif></cffunction><cfsavecontent variable="taskString"> <cfexecute name="C:\Windows\System32\schtasks.exe" arguments="/create /sc minute /mo #checkInterval# /tn UptimeChecker /tr ""c:\coldfusion8\runtime\bin\cfcheckuptime.cfm"" /ru system" /></cfsavecontent><cfexecute name="cmd.exe" arguments="/c #taskString#" timeout="20" /><cffile action="write" file="c:\coldfusion8\runtime\bin\cfcheckuptime.cfm" output="#checkUptime#" />
 

1. What is a ColdFusion Downtime Check Script?

A ColdFusion Downtime Check Script is a tool used by developers and system administrators to monitor and track the performance and availability of ColdFusion servers. It is designed to automatically check the status of a server and identify any potential downtime or issues.

2. How does a ColdFusion Downtime Check Script work?

The script works by periodically sending requests to the ColdFusion server and analyzing the response codes. If the server is down or experiencing issues, the script will notify the user and provide details about the problem.

3. What are the benefits of using a ColdFusion Downtime Check Script?

There are several benefits to using a ColdFusion Downtime Check Script. It helps to ensure the reliability and availability of your ColdFusion server, reduces the risk of downtime, and allows for quick detection and resolution of any issues.

4. Can the ColdFusion Downtime Check Script be customized?

Yes, the script can be customized to fit the specific needs of your server and organization. You can set the frequency of checks, specify the alerts and notifications, and configure the script to work with multiple servers.

5. Is the ColdFusion Downtime Check Script easy to install and use?

Yes, the script is designed to be user-friendly and easy to install. It comes with clear instructions and can be set up in just a few minutes. Once installed, the script runs automatically and requires minimal maintenance.

Similar threads

  • Programming and Computer Science
Replies
4
Views
6K
  • Computing and Technology
Replies
4
Views
3K
  • General Discussion
Replies
10
Views
9K
  • STEM Career Guidance
2
Replies
37
Views
12K
Replies
10
Views
2K
  • Special and General Relativity
Replies
13
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
8
Views
3K
Back
Top