LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:14 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
Open Source Consulting | Domain Registration