Solved

setting up a Cron Job on Centos

Posted on 2014-01-30
5
540 Views
Last Modified: 2014-02-20
Hi, Experts, Very new to this Centos OS, working on Command Panel.

we are hosting Coldfusion 9 on Centos Server and sometimes it goes down, throwing as 500 errors as Gateway times out,

we want to setup a cron job so whenever there is a connection, either it should immediately mail us.

or wheneerv the connection is broken, it creates a file on the server and then every fornight, it should send us the scheduled task in which the file should be attached

regards
0
Comment
Question by:myselfrandhawa
5 Comments
 
LVL 19

Expert Comment

by:jools
Comment Utility
How do you check for connection or if there is a connection broken?

What specifically are you looking for? Do you know what commands you run or have a script already in place?
0
 
LVL 10

Expert Comment

by:pfrancois
Comment Utility
Hi myselfrandhawa

I suggest you to add some elements to understand better your needs.

If I understand you correctly, the connection between the Centos server and the Internet gets lost from time to time. You want to set up a cronjob (on the same server?) to send a mail to tell that there is a connection. My question is: When does the system have to send the mail? As soon as the connection comes back?

My second question is: what do you mean with "it should send us the scheduled task in which the file should be attached"?
0
 
LVL 19

Assisted Solution

by:NickUpson
NickUpson earned 167 total points
Comment Utility
this software is designed to do what, I think, you want

http://mmonit.com/monit/

it can send email and/or take actions when something happens
0
 
LVL 13

Assisted Solution

by:Daniel Helgenberger
Daniel Helgenberger earned 167 total points
Comment Utility
To add my two cent:
I also support using IT monitoring for that, like nagios or the mentioned one above. But you do not need a fully flagged system for that  but rather use their plugins, I recommed check_http from nagios. Use your package manager to install it and create a script mailing the output if the exit code is non-zero.
0
 
LVL 61

Accepted Solution

by:
gheist earned 166 total points
Comment Utility
Gateway timeout means that coldfusion did not respond in 1 minute to web request.
Dig for root cause of coldfusion performance issues and it will go away.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Hi. There are several upload tutorials using jquery and coldfusion. I found a very interesting one here Upload Your Files using Jquery & ColdFusion and Preview them (http://www.randhawaworld.com/) . I did keep the main js functions but made sever…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now