![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Shell script to email based on flat file output | apoorva | Shell Programming and Scripting | 1 | 05-12-2009 11:53 AM |
| Script - How to automatically start another process when the previous process ends? | luna_soleil | Shell Programming and Scripting | 10 | 02-18-2009 12:26 PM |
| To get previous or future dates based on input value | Sharmila_P | Shell Programming and Scripting | 5 | 08-08-2008 08:54 AM |
| add lines automatically based on a field on another file | melanie_pfefer | Shell Programming and Scripting | 0 | 07-24-2008 03:59 AM |
| rerun a script if aborted and exited | melanie_pfefer | UNIX for Advanced & Expert Users | 3 | 02-21-2008 01:29 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Automatically Rerun a script based on previous execution output
Hi Experts,
I have a shell script called "updatevs" that is scheduled to run at 6.00 am everyday via cronjob. The cronjob will execute this script and output to a log file. The functionality of this script is to read the database and run a set of commands. This script is generally successful but some times due to network outage or Database being down it fails. Only in case of a failure i would like to rerun the script every 20 mins for the next 2 hours, if still not successful after 2 hours i would like an email to be triggered to address "xxxxx@abc.com" There may be several ways to solve this case however I was thinking of writing a small script called "checklog" which reads the log file and searching for the obevious words like "ERROR", when found "Checklog" script will rerun "updatevs" script. I don't think this is the solution as i can't see a way of making this recurring. Please let me know your valuable feeback on how to acheive this. Many Thanks |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|