Sponsored Content
Operating Systems Solaris Best practise for keeping cronjobs across 2 servers in sync Post 302985234 by javanoob on Monday 7th of November 2016 12:48:24 PM
Old 11-07-2016
Quote:
Originally Posted by Don Cragun
Are there any cron jobs on your system that need to run on the stand-by server? If not, have you considered disabling cron on the stand-by server and enable it when there is a switch from stand-by to active.
Hi Don,

Thanks for your reply and sorry for coming back late.
Yes, there are certain standalone cronjobs that needs to be run on the standby server. Thus i am not able to disable cronjob entirely.

Hence my thinking was to sync the cron scripts over and cron entries from the primary over. When there is a failover, i will manually add them (cut/paste) into the crontab in standby

Not sure if there is any other better way to do so..

Regards,
Noob

---------- Post updated at 12:48 PM ---------- Previous update was at 12:46 PM ----------

Quote:
Originally Posted by MadeInGermany
Do you have a shell command that shows if active or standby?
Then you can have identical crontab entries.
For example your shell command is "activecommand" and has an exit status zero when active, otherwise non-zero.
Code:
* * * * * if activecommand; then actualcroncommand; fi

Hi MadeInGermany,
Thanks for your insight !
I can make a simple function/script that return active or standby, but how do we keep the cron entries in sync on both servers ?

is it a manual work (e.g. when you add in nodeA, do the same on nodeB) ?

Regards,
Noob
 

10 More Discussions You Might Find Interesting

1. AIX

Cronjobs

We recently upgrade from AIX 4.3.3 to AIX 5.3, We noticed that some cronjobs that run for our programmers did not fire off this morning. You can crontab -l and -e and see the jobs. Did AIX 5.3 change something? Thanks Mike (1 Reply)
Discussion started by: mcastill66
1 Replies

2. UNIX for Dummies Questions & Answers

Need Unix Terminal for practise on Rental basis ...plz help!

Hey Guys,, Have just got started with Unix , I need UNIX Terminal to practise commands. Does any website host such services ? Happy Holidays... (9 Replies)
Discussion started by: rrover1977
9 Replies

3. Solaris

Sync to Green vs. Separate Sync

Hi all....I have a Sun Ultra2 that I want to use with my PC monitor. I have purchased an adapter that does not work and I was told I need to change my video card setting (if I can) to Separate Sync.....my Monitor product number ends in 1343......I am running SunOS 5.7 ......anyone have any ideas? ... (0 Replies)
Discussion started by: psantinello
0 Replies

4. Red Hat

how to find the red hat servers in time sync

Hi all, Before i'm going to install application on my RHEL servers, I just wanted make sure servers in time sync. How can I find it. Thanks. (1 Reply)
Discussion started by: s_linux
1 Replies

5. Shell Programming and Scripting

sync files from two different servers.

I have a directory called UNIX 1 which contains 2 files and uploaded into two different servers. Now I want to check whether the directory contains both the files. If not, then need to sync the directory. Please let me know how to do that in shell scripting. (2 Replies)
Discussion started by: madan1
2 Replies

6. Shell Programming and Scripting

Is it bad practise to exit in function?

Question is title, I don't understand why all examples I am reading return constants error values instead of just exiting under certain conditions... then back in main script test return value and exit if true, to me seems like a lot of extra typing and test conditions which can make for bulky and... (5 Replies)
Discussion started by: gcampton
5 Replies

7. Web Development

How do you sync tables in mysql between two different servers?

Hi all, I have 2 mysql databases running on two different servers (both can be accessed via ssh to each other). If I have say table ABC on server 1, how can I sync it with table ABC on server 2 if the number of records is different? Both databases are the same structure though server 2 has... (2 Replies)
Discussion started by: muay_tb
2 Replies

8. UNIX for Advanced & Expert Users

How to Sync two servers

Hi All, want to sync. two servers , both are having solaris os. If am updating any thing in one server , it will automatically sync. with the other server . Is it possible , if so den how ? (3 Replies)
Discussion started by: natraj005
3 Replies

9. Solaris

Client does not sync date with ntp servers

We had a network problem a couple of days before that caused 1 interface to down and up. But today I have noticed that our date is wrong, our system have 4 servers and the other 3 are OK. I used <date> command, the result is: Fri Jan 2 17:57:55 ICT 1970 I have tried set date to be the same as... (3 Replies)
Discussion started by: salvation3103
3 Replies

10. What is on Your Mind?

Odd(?) shell script practise

Hello, I often stumble over a common shell coding practise. Example 1: #!/bin/sh # # Licensed Materials - Property of IBM # Rational ClearCase # (C) Copyright IBM Corp. 1999, 2010. All Rights Reserved # US Government Users Restricted Rights - # Use, duplication or disclosure restricted... (4 Replies)
Discussion started by: MadeInGermany
4 Replies
DPMSSetTimeouts(3)						    X FUNCTIONS 						DPMSSetTimeouts(3)

NAME
DPMSSetTimeouts - permits applications to set the timeout values used by the X server for DPMS timings SYNOPSIS
cc [ flag ... ] file ... -lXext [ library ... ] #include <X11/extensions/dpms.h> Status DPMSSetTimeouts ( Display *display, CARD16 standby, CARD16 suspend, CARD16 off ); ARGUMENTS
display Specifies the connection to the X server standby Specifies the new standby timeout in seconds suspend Specifies the new suspend timeout in seconds off Specifies the new off timeout in seconds DESCRIPTION
The DPMSSetTimeouts function permits applications to set the timeout values used by the X server for Display Power Management Signaling (DPMS) timings. The value standby is the amount of inactivity time, in seconds, before standby mode is invoked. The actual effects of this mode are depen- dent on the characteristics of the monitor and frame buffer card. Standby mode is implemented by shutting off the horizontal sync signal, and pulsing the vertical sync signal. Standby mode provides the quickest monitor recovery time. Note also that many monitors implement this mode identical to suspend mode. A value of zero disables the standby mode. The value suspend is the amount of time of inactivity, in seconds, before the second level of power savings is invoked. Suspend mode's physical and electrical characteristics are implementation defined. For DPMS compliant hardware, setting the suspend mode is implemented by pulsing the horizontal sync signal and shutting off the vertical sync signal. In general, suspend mode recovery is considered to be slower than standby mode, but faster than off mode. However it may vary from monitor to monitor. As noted above, many monitors implement this mode identical to the standby mode. A value of zero disables this mode. The value off is the amount of time of inactivity,in seconds, before the third and final level of power savings is invoked. Off mode's physical and electrical characteristics are implementation defined. In DPMS compliant hardware, it is implemented by shutting off both hor- izontal and vertical sync signals, resulting in powering down of the monitor. Recovery time is implementation dependent. Usually the recovery time is very close to the power-up time of the monitor. A value of zero disables this mode. Chronologically, standby mode occurs before or simultaneously with suspend mode, and suspend mode must occur before or simultaneously with off mode. Therefore, non-zero mode timeout values must be greater than or equal to the timeout values of earlier modes. If inconsistent values are supplied, a BadValue error will result. RETURN VALUES
TRUE The DPMSSetTimeouts function returns TRUE when the function has succeeded. ERRORS
BadValue An argument is out of range. SEE ALSO
DPMSCapable(3), DPMSInfo(3), DPMSGetTimeouts(3) X Version 11 libXext 1.0.5 DPMSSetTimeouts(3)
All times are GMT -4. The time now is 01:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy