• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 576
  • Last Modified:

setting up a Cron Job on Centos

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
Gurpreet Singh Randhawa
Asked:
Gurpreet Singh Randhawa
3 Solutions
 
joolsCommented:
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
 
Pierre FrançoisSenior consultantCommented:
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
 
Nick UpsonPrincipal Operations EngineerCommented:
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
 
Daniel HelgenbergerCommented:
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
 
gheistCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now