Re: Hello list, script scheduling question.

From: V Raman <>
Date: Sat, 26 May 2018 14:28:11 -0500
Message-ID: <>

Thanks Mladen and Rajeev.

I am aware of that solution, this script is expected to be a 'generic' script to work on multiple servers, so we have some extra logic on channels, parameters etc. So there will be more error checking and possible failure points. I will have to add a call to clean up before every possible failure point with the file approach. Not difficult, but if something like pgrep works, there will be less code.


On Sat, May 26, 2018 at 10:41 AM, Rajeev Prabhakar <> wrote:

> Venky,
> One thought that comes to mind is :
> create sid specific backup status file
> and if that file exists, code your script
> that it won't spawn a second instance
> of backup for the same sid.
> Of course, for any abnormally ending
> /zombie backups, make sure the
> script cleans up those kind of status
> files.
> Rajeev
> > On May 25, 2018, at 5:46 PM, V Raman <> wrote:
> >
> > I am trying to set up a backup script to be called for various DBs in
> the DB server through crontab. If an instance of the script is running for
> the GIVEN oracle_sid I dont want another instance of the backup script to
> be started. However, if an instance of the script is running for a
> different oraclesid, I am ok with starting a new instance run of the
> script. Linux RHES7, bash.
> >
> > I tried using grep, grep -v $$, pgrep, etc inside the script and also
> tried pgrep in crontab, not lucky. Web searching has not led me anywhere so
> far. Any short and sweet solution for this issue?
> >
> > Thanks,
> > venky.

Received on Sat May 26 2018 - 21:28:11 CEST

Original text of this message