How do i run a shell script without crontab.

Hi Folks,

Could you please suggest me how to run a shell script on a solaris env without using crontab. I am actually trying to write a shell script which will grep "WORD" in the logfile andd sends a email.Thanks in advance.

Thanks
Sandeep.

All you have to do is to

nohup run-your-command.sh ...... > mylog 2>&1 &

Your script is now running in the backup without hangup (nohup) and you can logoff the system without terminating your script execution

Hi!
Some more views; If You want Your script to run "forever", You can envelope Your "business" code in Your script in an eternal loop, something like:

...
while [ 1 ] ; do
grep "WORD" logfile
some other code
...
sleep 300
done
...

lakris

Thank you Lakris, it worked for me....