scheduling script to run another script on Solaris


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting scheduling script to run another script on Solaris
# 1  
Old 03-27-2005
scheduling script to run another script on Solaris

Hi everyone,

I am trying to automate one process on Solaris OS.
This is what happens at the moment.

Every night at 19:30 and every hour after that we run a script that checks the status of databases. That script runs and prints if db's are OK at the end it states how many were down.

I am trying to make another script that would run the above script and possibly check the output and maybe alert the admin if more than one database is down.

It the moment i dont how to write scripts but would like to learn and implement this idea. I had a look at the at command and the cron but still not sure how to go about implementing this, assuming this is possible.

Would anyone be able to help me with this or/and point me to some information that would help me implement this please.

Regards,

Andrei
# 2  
Old 03-27-2005
Since this is going to be happening regularly every day, cron is your best option. You can have the following entry in the crontab:

30 19-<whatever time you choose> * * * <name of script to check databases>

Also, why do you need another script to check the output of the first one? Just have the script run a wall command or send mail to the admins if databases are down.
# 3  
Old 03-27-2005
Thanks,

I think I will explore the option where the script sends an e-mail to myself and other operators. Currently the script just echoes the status of databases to the screen. I suppose I could just change that so it emails this output. I had a look at the wall command and it looks like it sends email to everyone logged in. Is there a way to make the script send an e-mail to group of a people and not to everyone?

Thanks for the help

Andrei
# 4  
Old 03-27-2005
mailx is a good mail client. Try that one.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Scheduling a script

Hi, I have my script in below path in UNIX /storage/sas_source/SDTM-Development/FileWatcher/filewatcher.sh I want to schedule it to run every 30 secs. Please let me know the steps to do it. Thanks. (7 Replies)
Discussion started by: prats_7678
7 Replies

2. Shell Programming and Scripting

Calculating script run time in Solaris OS

Hi All, I have written script and wanted to know the run time of it in seconds. i used below logic but am not getting the results in second instead getting error. cat pkloader.sh # if you want to calculate the time in milliseconds then use $(date +%s%N) START_TIME=`date +%s` echo... (2 Replies)
Discussion started by: Optimus81
2 Replies

3. Shell Programming and Scripting

how to run an already made script run against a list of ip addresses solaris 8 question

how to run an already developed script run against a list of ip addresses solaris 8 question. the script goes away and check traffic information, for example check_GE-VLANStats-P3 1.1.1.1 and returns the results ok. how do I run this against an ip list? i.e a list of 30 ip addresses (26 Replies)
Discussion started by: llcooljatt
26 Replies

4. UNIX for Dummies Questions & Answers

Scheduling a script by using Crontab

Hi, I need to schedule a script in crontab which should run at 01:00 am in the morning and should run for every 15 days in a month. How to schedule this by using crontab? Many thanks. Rgds, (13 Replies)
Discussion started by: venkatesht
13 Replies

5. UNIX for Advanced & Expert Users

Scheduling a script other than crontab

Hi, How can we run/schedule a shell script. Since there is no access to cron at this point of time we have to think other way out to run a script every hour. How can we achieve this. Need advice. How about using sleep,autosys etc...the script should trigger off every hour...which sends... (3 Replies)
Discussion started by: noorm
3 Replies

6. Shell Programming and Scripting

Shell script for scheduling

Hi guys, I am new guy for unix. I need help writing the following shell script. My requirement is: I have few pl/sql procedures(lets say 10). I want to run some of them (say 5) parallally in the background and once these are completed trigger the next ones one after other. Could some one... (13 Replies)
Discussion started by: chanduhyd4u
13 Replies

7. Solaris

How to run a script as different user inside cronjob in solaris.

Hi , I have a shell script to perform some actions on sun solaris box . This script normally requires to be run as a different user. so, whenever i have to run this script, i need to sudo in as that user , enter the password and execute it. Now,I have to setup a cronjob to execute the script... (11 Replies)
Discussion started by: csg_user
11 Replies

8. Solaris

how do I start a script in run level 3 in solaris?

Hi, how do I start a script in run level 3 in solaris? (4 Replies)
Discussion started by: mokkan
4 Replies

9. Shell Programming and Scripting

script scheduling

Hi, I have a ksh scrip (x) that scans a directory and does actions when a file arrives in this directory. My question is what is the best way to schedule x? 1. Use cron tab and create a task running forever 2. Creat another ksh script (y) that runs (x) in a non-terminating loop Which... (2 Replies)
Discussion started by: GNMIKE
2 Replies
Login or Register to Ask a Question