AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Power
#Power
#Operatingsystems
#Servers
 View Only
  • 1.  Using Cron in a multi server environment

    Posted 11/21/08 12:07 PM

    Originally posted by: aditya_2005


    Hi,

    We are currently having one ibm p590 running AIX 5.3L for the production applications. We run various jobs on this server through cron. We are planning to add three similar servers as a part of the infrastructure upgrade. The problem that we are facing is, how would cron be setup in the new architecture when all 4 servers would be running. We thought of running cron on all the servers, but that would create a conflict as to which server should the job be executed by. The reason for addition of the three servers was to provide a grid environment for a Data warehouse tool - informatica power center. But in doing so, we are stuck up with the cron connfiguration. Is there any way we can create a clusture for these four servers, so that the cron jobs are executed only from one server while providing failover mechanism. So if the server running the cron jobs fail, one of the remaining servers should be in a position to run the jobs from cron. Also is there any application that can manage all the four servers and also provide failover mechanism?

    Thanks,
    Aditya
    #AIX-Forum


  • 2.  Re: Using Cron in a multi server environment

    Posted 11/21/08 12:45 PM

    Originally posted by: unixgrl


    If you are trying to create a multi-server environment where only one system can run the app at a time, the app should be smart enough to figure out if it is already running. For example, it should have a start script that would move the crontab in place if it can't ping the other servers.

    The same concept holds true if you use clustering software. With HACMP or VCS, you'd have an application start script that would start the app running. If the system crashes, the app would automatically start somewhere else. Normally, you wouldn't use cron to run your app but if that's what you need, make a wrapper script with the intelligence to figure out if it should be running. If so, have it copy in the correct crontab.

    If you don't use any clustering software, then the script running from cron needs to have some way of knowing whether it should run or exit. It is up to the app people to figure that out. (maybe they look for a mounted filesystem, ping the other server, look for a lockfile, etc)

    The other way to do this is to have an application IP that moves from system to system. Create an IP for example of "myappip". Then have that IP only be up on one system at a time. Make sure the app only talks to that IP and that you can swing traffic with clustering software or some kind of network routing application.

    HACMP, Tivoli, & Veritas cluster server all provide failover capabilities for a price.
    #AIX-Forum


  • 3.  Re: Using Cron in a multi server environment

    Posted 11/24/08 11:13 AM

    Originally posted by: tony.evans


    As the previous poster said, essentially it depends. It depends on what you're doing, your app, how complex your environment is, and what you actually want to achieve.

    There's no built in mechanism for handling cron running in multiple locations but not duplicating effort, so depending on what you're trying to achieve you'll need to engineer something.
    #AIX-Forum