Failed over crontab?


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Failed over crontab?
# 1  
Old 04-12-2010
Failed over crontab?

All,
I am working on planning a redundant SFTP setup and some jobs are ran using cron jobs. Would there be a way to some how failover a crontab to another server?
# 2  
Old 04-12-2010
Well that's a tough one, it's hard to prove cron isn't working right without duplicating cron, and just duplicating it wouldn't be useful... You could have scripts that check if the master server is online first before attempting to do the job perhaps, but if that isn't done right you could cause yourself a lot of problems.
# 3  
Old 04-12-2010
You could use SSH to check if the file exists on the remote server and initiate an SFTP session if:
  1. the file does not exist
  2. the file size is ZERO
  3. the file checksum (/usr/bin/cksum file) is not the same on the local and remote servers

You'll need to setup keys on the local servers and the remote server to get this to run without password prompts.

HTH
# 4  
Old 04-12-2010
All,
I guess what i'm looking for is if somehow the server went down from the network or powered off, the other server would be able to load the cron file and take over the cron jobs.

Any ideas?
# 5  
Old 04-12-2010
would the local server even have all the scripts and relevant data files to run everything in the remote server's crontab?
# 6  
Old 04-13-2010
Quote:
Originally Posted by Corona688
would the local server even have all the scripts and relevant data files to run everything in the remote server's crontab?
Corona,
the setup would be 2 load balanced SFTP servers. The scripts are actually push scripts to send to different locations. I would have the data mounted on a cifs share so that both could access what it needs.

THe problem comes in if one of hte SFTP servers goes down, they both can't be running the same transfer scripts, it would cause conflicts.

So, I would want for somehow the other SFTP server be able to begin running the cronjobs if the other failed.

It seems most likely I'll just need to rsync a copy to the other and manually activate it if that happens :/
# 7  
Old 04-13-2010
Quote:
Originally Posted by markdjones82
The problem comes in if one of hte SFTP servers goes down, they both can't be running the same transfer scripts, it would cause conflicts.

So, I would want for somehow the other SFTP server be able to begin running the cronjobs if the other failed.

It seems most likely I'll just need to rsync a copy to the other and manually activate it if that happens :/
Yeah. It's not the usual sort of failover problem where clients connect to one server or another, it's a standalone thing that somehow has to be made aware of the universe...
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

TL upgrade failed

Hi I'm trying to upgrade the AIX TL on my test LPAR. current os level is "7100-01-06-1241" Planning to upgrade it to latest TL. "7100-02-03-1334" 1) Downloaded the TL files from fix central Selected "7100-02-03-1334" --> requisite "7100-02-00-1241" ==> Downloaded both 2) backedup... (9 Replies)
Discussion started by: System Admin 77
9 Replies

2. UNIX for Dummies Questions & Answers

FTP failed

Hi All, We are using the following step to place a file in server using FTP STEP_EXECUTE STEP090 /usr/pjc/bin/FTP -i DATASET FTPIN $sic/ctl/ftpsic.ctl DISP=OLD,KEEP,KEEP STEP_END If we run this step we are getting the error. ftp> open arg.mnd.appsc.com Connected to arg.mnd.appsc.com.... (4 Replies)
Discussion started by: ajaykumarkona
4 Replies

3. Solaris

Cygwin X Server error: xdmcp fatal error session failed session 23 failed for display

Hi, i got the following error when i tried to access the cygwin x server from a windows XP PC. "xdmcp fatal error session failed session 23 failed for display" Alternatively, when i tried to access the same Cygwin X Server from another windows XP PC which is on a different LAN... (3 Replies)
Discussion started by: HarishKumarM
3 Replies

4. AIX

Processor failed

Processor failed on POWER 5 machine, i have other "test" machine with different machine type, can i recover the production machine by moving its disks and HBAs to the other test machine ?? (4 Replies)
Discussion started by: majd_ece
4 Replies

5. Solaris

growfs failed

OS: Solaris 10 Issue: metastat shows 12GB /var, df shows 3 GB /var. Solution: growfs Error: # growfs -M /var /dev/md/rdsk/d6 /dev/md/rdsk/d6: Unable to find Media type. Proceeding with system determined parameters. failed to disable logging. I think the "unable to find Media type" is... (8 Replies)
Discussion started by: aixlover
8 Replies

6. UNIX for Dummies Questions & Answers

Ok. I've have looked and failed.

What I want seems to me should be simple but so am I so.... I have a Unix server that is running a program we will say logged in as UserA. The program is outputting a bunch of stuff to the terminal. I would like to log in from my machine to the server as Either UserA, UserB or if needed... (2 Replies)
Discussion started by: Dishevel
2 Replies

7. AIX

to identify failed pv

Hi friends,.... am sindhiya, i have joined as AIX level 1 support. help me to identify the failed pv in vg which has some 4 physical volumes? (2 Replies)
Discussion started by: sindhiya
2 Replies

8. AIX

SFTP Failed---Request for subsystem 'sftp' failed on channel 0

Hi, While I am trying SFTP my machine to another unix machine , it was working fine till 10 min back. But now i am getting the below error "Request for subsystem 'sftp' failed on channel 0" Could you please someone help me to solve or analyise the root cause... Cheers:b:, Mahiban (0 Replies)
Discussion started by: mahiban
0 Replies

9. Solaris

mirror failed

i am working in sun solaris unix platform with storage device T3+ i got an error message mirror failed i have telneted to the storage and gave the command format it gives disk not available , i have shifted my storage from node A to node B then i gave the same command format by telneting to... (0 Replies)
Discussion started by: sasiprabu
0 Replies

10. Programming

g++ is OK while gcc is failed

#include <iostream> using namespace std; int main(void) { cout << "hello" << endl; return 0; } I tried this: 1) g++ test.cpp -o test // It's OK 2) gcc test.cpp -o test // Failed /tmp/ccriZviL.o(.text+0x14): In function `main': : undefined reference to... (3 Replies)
Discussion started by: princelinux
3 Replies
Login or Register to Ask a Question