automatically restart scripts

I am new to AIX shell scripting, please help......

I want to write a automatically restart script for one of my application. For example, the application name: ABC (you can see its ID from ps -ef | grep ABC). It can be started by ABC.sh file but it has to be stopped by using "ps -ef | grep ABC" and "kill" it.

Now I want to automatically restart ABC every 1 hour. AIX version 5.2. K shell.

Can anyone help me?

Thanks a lot~~~

To have scripts executed periodically you can use cron which is described in depth here: cron and crontab

When you got the PID you can hand it over to kill with the command xargs for example. Best write your script so that it is able to accept parameters like [start|stop|restart], ie. check $1 with a case/esac statement. This will make it more versatile.

Thanks! I am really new to Shell scripting, is it possible to have you to show me an example? Appreciated~~