The UNIX and Linux Forums  
Hello and Welcome from to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



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
Monitoring a single process in solaris jayana SUN Solaris 3 05-31-2008 03:35 AM
Monitoring for a hung process prismtx Shell Programming and Scripting 2 03-08-2008 09:31 AM
monitoring process list via snmp, hrSWRun Bzubi AIX 0 10-18-2007 05:43 AM
process monitoring eric_wong_ch Shell Programming and Scripting 3 10-11-2007 07:08 AM
Monitoring ftp process arkhewit UNIX for Dummies Questions & Answers 2 06-29-2005 07:56 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 08-30-2006
rdc69 rdc69 is offline
Registered User
  
 

Join Date: Aug 2006
Posts: 1
Question Process Monitoring Script Help

I have a shell script which runs from 7AM to 3AM every day. The script performs certain monitoring functions and if it has a problem it may need to email someone about it. The problem is that the notification process was never modified to handle running past midnight (from 23:59:59 till 3AM). The current process uses a data file that specifies the times email notification should be sent (first = day of week, 2nd = start time, 3rd = stop time):

0 070000 235959
1 070000 235959
etc.

Past logic was to take the current date and add the start time together to get "starttime" and add end time to the current date to get "endtime". If "now" is between "starttime" and "endtime" page, else don't.

I need to change this to be something like
0 070000 020000
1 070000 030000
etc.

I am having trouble dealing with after midnight. So, if it is 08/30/06 00:00:01 I don't want the "starttime" to be "08/30/06 07:00" and the "endtime" to be "08/31/06 03:00". Also, I need to the logic to be smart enough to deal with accurately determining what the next or previous day is based on the result of "date".

I have looked briefly at "datecalc" but I don't see that it can do what I need.

Any help?

Thanks.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 11:02 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0