The UNIX and Linux Forums  

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
Timer aekaramg20 Shell Programming and Scripting 6 08-21-2008 10:47 AM
timer interrupt compbug UNIX for Dummies Questions & Answers 2 06-30-2006 04:41 PM
Timer for VNC foweja UNIX for Advanced & Expert Users 1 07-14-2005 11:31 AM
VNC Timer foweja Shell Programming and Scripting 0 07-13-2005 01:25 PM
reply timer Optimus_P Post Here to Contact Site Administrators and Moderators 2 07-31-2001 10:50 AM

 
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
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 11-08-2004
k_oops9 k_oops9 is offline
Registered User
  
 

Join Date: Nov 2004
Posts: 11
timer

Hi all,


Wanted to a create a shell script
-----------------------------------------------------------------------
1) which when called will start a timer and wait for 48 hours.
after 48 hours it will call some function(say XYZ)

2) Whenever this shell script is called (can be called anytime), the timer again starts from 1.
-----------------------------------------------------------------------


can this be possible..

script

-----------------START------------------------------------------

dt_start_var1 = get date and time.(that will be almost
when this script is called)

dt_target_var2 = dt_var1 + 48 hrs

do while loop

# keep on getting the lastest date and time
current_dt_var = get current date and time.

# then compare
if current_dt_var >= dt_target_var2 then break;

end

call ( XYZ function)

---------------------------END--------------------------------


if above steps are possible in Shell SCript can please anybody provide with the syntax and code for the above 7 lines.
Or else any alternate solution.


Will be greatly thankful.


Thanks in advance.

k_oops
 

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 06:40 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