Need help on scripts

Hi,

I am new to AIX, can anyone help me to create a scripts that can stop and start an application every 10 minutes?

PS, I do have a scripts (.sh) already to automatically restart the application, but I need another scripts to call this scripts in every 10 mins. Or add something in the .sh script to restart it every 10 mins?

Thanks,

Have a look at the man page of "cron" and/or "crontab":

man cron
man crontab

I hope this helps.

bakunin

Thanks a lot for your input!

I am not familiar with corntab or corn. Could you please give me an example of running my .sh file every 20 mins? Are following commands correct? Or do you have any better suggestions?

0 * * * * /opt/dev/go.sh
20 * * * * /opt/dev/go.sh
40 * * * * /opt/dev/go.sh

Another questions is how to stop it? I mean after finish my task, how to stop corntab/corn?

Thanks.

As bakunin stated the man page for crontab explains this.

0,20,40 * * * * /opt/dev/go.sh

You might also want to read this as further lecture about cron and crontab:

Thanks.

Unfortunately, my account do not have privileges to run corn jobs. Do yo have any other suggestions?

Hi
call your admin
for every user he can make a crontab:)

regards

Hi

FYI : The /var/adm/cron/cron.allow and /var/adm/cron/cron.deny files control which users can use the crontab command.

 
*/20 * * * * /opt/dev/go.sh