to keep a process alive?

From: google-rambo88 (rambo88_at_gmail.com)
Date: 03/30/05


Date: Thu, 31 Mar 2005 00:37:09 +0900

To keep a process alive, I made a simple shell. it'll run rmawatch.sh from
crontab..
If someone have more good method to keep process alive, Could you advice me?
=== rmawatch.sh ========
#!/bin/sh
RMA_PATH=/usr/app/bin
#TTI is process name
PSRMA=`ps aux| grep my_process | awk '{print $2}'`
if [ -z "${PSRMA}" ]
then

        ${RMA_PATH}/my_process
fi

*********************************************************
crontabl -l
=========================================
0 * * * * /opt/TTIagent/bin/rmawatch.sh > /dev/null 2>&1

Have a day.



Relevant Pages

  • Re: crontab question on solaris 10
    ... SHELL may be overridden by set-tings in the crontab; LOGNAME may not." ... "EXAMPLE CRON FILE ...
    (comp.unix.solaris)
  • Re: oracle script
    ... The shell is invoked from your $HOME directory with an arg0 ... explicitly do so in the crontab file. ... cron jobs is /usr/bin; while root cron jobs default to ...
    (comp.unix.solaris)
  • Re: script wont run using cron.d or crontab
    ... I have a fairly lengthy script that I am able to run without any problems from a shell. ... now I am wanting to get it running using crontab or cron.d. ... I am assuming that there is something missing within the environment that cron runs that fails to allow these commands to run. ...
    (comp.lang.python)
  • Re: Command fail in crontab but work in a shell?
    ... >> Command fail in crontab but work in a shell ... > Most newbie failures with that symptom is because the path is not set ... > each command which is not a shell builtin. ... sign has a special meaning in a crontab file (yes, ...
    (comp.unix.misc)
  • Re: crontab question on solaris 10
    ... SHELL may be overridden by set-tings in the crontab; LOGNAME may not." ... A crontab file consists of lines of six fields each. ...
    (comp.unix.solaris)