VCS and crontab jobs - Veritas Cluster Server

This is a discussion on VCS and crontab jobs - Veritas Cluster Server ; Is there anything in VCS to support crontab jobs or something to use as crond? We have applications that have a lot of scripts in crontab. When we will move those application to a cluster on shared arrays all those ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: VCS and crontab jobs

  1. VCS and crontab jobs


    Is there anything in VCS to support crontab jobs or something to use as crond?
    We have applications that have a lot of scripts in crontab. When we will
    move those application to a cluster on shared arrays all those cron jobs
    will be on shared filesystems. And those volumes are not mounted on secondary
    nodes, but jobs will still try to run and crond will send error in email.
    Is there any way to control those jobs via VCS or anyhow else?

  2. R: VCS and crontab jobs

    Hi

    Even if there are a lot of ways to manage a contab in a HA environment (i.e.
    using an "application" agent which will add/remove some crontab entries, or
    developing a simple "ad hoc" costume agent), I think that the best solution
    (easy to deploy and to manage) is to keep the root crontabs of all your
    systems exactly the same and use some "if" conditions to manage the
    switches.
    Example (to help my poor English :-( )
    If you have to run the command "rm /export/home/sg1/core" every morning ad 8
    a.m. on the system where the sg1 is on line. Create an entry in the crontab
    of each system where the sg1 can switch as:

    0 8 * * * [ conditions] && rm /export/home/sg1/core > /dev/null 2>&1

    where condition is true only on the system where sg1 is online (typically
    the existence of the shared file system [ -d /export/home/sg1 ] or something
    like that)

    I hope that helps


    Regs

    Damiano



    Oleg Aksenov wrote in message 3c98db88$1@hronntp01....
    >
    > Is there anything in VCS to support crontab jobs or something to use as

    crond?
    > We have applications that have a lot of scripts in crontab. When we will
    > move those application to a cluster on shared arrays all those cron jobs
    > will be on shared filesystems. And those volumes are not mounted on

    secondary
    > nodes, but jobs will still try to run and crond will send error in email.
    > Is there any way to control those jobs via VCS or anyhow else?




  3. Re: R: VCS and crontab jobs


    I agree with this response. This is what we did and it works well. It is
    a good practice in general to put this kind of test into crontab command
    lines just to keep from getting errors if a filesystem is offline for maintenance
    at the scheduled time of a cron job.

    "Zilio Damiano" wrote:
    >Hi
    >
    >Even if there are a lot of ways to manage a contab in a HA environment (i.e.
    >using an "application" agent which will add/remove some crontab entries,

    or
    >developing a simple "ad hoc" costume agent), I think that the best solution
    >(easy to deploy and to manage) is to keep the root crontabs of all your
    >systems exactly the same and use some "if" conditions to manage the
    >switches.
    >Example (to help my poor English :-( )
    >If you have to run the command "rm /export/home/sg1/core" every morning

    ad 8
    >a.m. on the system where the sg1 is on line. Create an entry in the crontab
    >of each system where the sg1 can switch as:
    >
    >0 8 * * * [ conditions] && rm /export/home/sg1/core > /dev/null 2>&1
    >
    > where condition is true only on the system where sg1 is online (typically
    >the existence of the shared file system [ -d /export/home/sg1 ] or something
    >like that)
    >
    >I hope that helps
    >
    >
    >Regs
    >
    >Damiano
    >
    >
    >
    >Oleg Aksenov wrote in message 3c98db88$1@hronntp01....
    >>
    >> Is there anything in VCS to support crontab jobs or something to use as

    >crond?
    >> We have applications that have a lot of scripts in crontab. When we will
    >> move those application to a cluster on shared arrays all those cron jobs
    >> will be on shared filesystems. And those volumes are not mounted on

    >secondary
    >> nodes, but jobs will still try to run and crond will send error in email.
    >> Is there any way to control those jobs via VCS or anyhow else?

    >
    >



  4. Re: VCS and crontab jobs


    We wrote a simple application agent to bring the production crontabs online
    with the correct service groups and restore them to a safe mode when the
    service groups are offline. Works fine!


    "Oleg Aksenov" wrote:
    >
    >Is there anything in VCS to support crontab jobs or something to use as

    crond?
    >We have applications that have a lot of scripts in crontab. When we will
    >move those application to a cluster on shared arrays all those cron jobs
    >will be on shared filesystems. And those volumes are not mounted on secondary
    >nodes, but jobs will still try to run and crond will send error in email.
    >Is there any way to control those jobs via VCS or anyhow else?



  5. Re: VCS and crontab jobs

    Oleg Aksenov wrote:
    > Is there anything in VCS to support crontab jobs or something to use as crond?
    > We have applications that have a lot of scripts in crontab. When we will
    > move those application to a cluster on shared arrays all those cron jobs
    > will be on shared filesystems. And those volumes are not mounted on secondary
    > nodes, but jobs will still try to run and crond will send error in email.
    > Is there any way to control those jobs via VCS or anyhow else?


    I read this question right after you posted it. At the time we did not
    have permission to publish our scripts, they were developed for a
    client, but now we do. Please look at
    http://users.linpro.no/janl/veritas/VCS-rc.html for a generic
    application agent to manage startup and stop commands for resource
    groups and http://users.linpro.no/janl/veritas/VCS-crontab.html for a
    implementation of movable crontabs on top of that.

    Zilio Damiano wrote:
    ....
    > 0 8 * * * [ conditions] && rm /export/home/sg1/core > /dev/null 2>&1


    While this is very easy it creates a maintenance night mare, esp. if you
    run applications that needs crontabs. The scripts pointed to above
    avoids this altogether.

    Regards,
    Nicolai

+ Reply to Thread