LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-18-2009, 09:35 AM   #1
WojtekO
Member
 
Registered: May 2006
Distribution: CentOS 5
Posts: 47

Rep: Reputation: 15
Remotely control a server's cron?


Hello there,

I'm administering about two dozen asterisk servers and I'd like to know if there would be a way to administer cron remotely instead of having to open a ssh session for each to initiate some changes.

I though about hosting .sh files on the main server and the other ones would wget the file every hour and execute it.

Any other tips or ideas for what I'd like to do?
 
Old 03-18-2009, 12:51 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 18,504

Rep: Reputation: 3992Reputation: 3992Reputation: 3992Reputation: 3992Reputation: 3992Reputation: 3992Reputation: 3992Reputation: 3992Reputation: 3992Reputation: 3992Reputation: 3992
Quote:
Originally Posted by WojtekO View Post
Hello there,

I'm administering about two dozen asterisk servers and I'd like to know if there would be a way to administer cron remotely instead of having to open a ssh session for each to initiate some changes.

I though about hosting .sh files on the main server and the other ones would wget the file every hour and execute it.

Any other tips or ideas for what I'd like to do?
Hmm..I wouldn't have thought of wget, interesting train of thought.

I would probably put whatever scripts/jobs onto each of the two dozen servers, but have CRON on a central server, call smaller scripts, which use SSH and keyswapped ID's (for passwordless logins), to execute. Something like:

#!/bin/bash
echo "Job for Asterisk1 starting at `date` >> /log/asterisk1.cron.out
ssh userID@asterisk1 "whatever shell script to do something.sh" >> /log/asterisk1.cron.out 2>&1&
echo "Job <name> for Asterisk1 ended at `date` >> /log/asterisk1.cron.out

To grab any errors, messages, etc., and give you times/dates for the job starts/ends, into a log file, one for each server.

Just a thought.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Control Monitorless Media PC Remotely (w/o VNC) jeffreya Linux - Software 0 05-01-2008 11:30 AM
Media player remotely control? Garma Linux - Software 3 04-02-2005 08:27 AM
Using WinXP to remotely control Linux box RDP? VNC? Fisslefink Linux - Networking 4 03-14-2005 12:38 AM
remotely control/login to system without forwarded 20-22 fibbi Linux - Software 2 10-20-2004 08:56 AM
remotely control linux box thevariegator Linux - Newbie 23 03-21-2003 10:56 AM


All times are GMT -5. The time now is 12:20 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration