The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
why the below script is not working ., konankir Shell Programming and Scripting 14 03-27-2008 01:32 PM
Shell Implementation not working correctly AirBronto High Level Programming 14 02-15-2008 07:41 PM
Script not running correctly phixsius Shell Programming and Scripting 1 01-25-2008 03:42 AM
Variable not working correctly. walsh_j Shell Programming and Scripting 3 05-30-2007 11:50 AM
if not working correctly 2dumb Shell Programming and Scripting 3 05-03-2007 11:38 AM

Closed Thread
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 10-11-2002
Registered User
 

Join Date: Sep 2002
Posts: 11
Script not working correctly

I have a simple script that I want to run every 30 minutes but only when I execute it. I don't want it to be a crontab job.

so i have for example

date
ls -l
who
sleep 1800

The first time it executes correctly but after the first time it nevers execute back again. It should execute after 30 minutes again.

Why?
What Am I doing wrong?

Thanks
Forum Sponsor
  #2  
Old 10-11-2002
Registered User
 

Join Date: Sep 2002
Location: Austin, TX
Posts: 41
elchalateco,

You will need to add a loop construct to your script.


Biker
Systems/Network Administrator
LiveFire Labs - Hands-On Technical e-Learning
www.LiveFireLabs.com
__________________
Biker
Systems/Network Administrator
LiveFire Labs - Hands-On Technical e-Learning
www.LiveFireLabs.com
  #3  
Old 10-11-2002
Kelam_Magnus's Avatar
Registered User
 

Join Date: Aug 2001
Location: DFW McKinney, TX,
Posts: 1,069
Something like. Do a search for the "while loop". This will go until you kill it. Endless loop with "while true" test.

while true
do
command
command
command
done

__________________
My brain is your brain
Google The UNIX and Linux Forums
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 10:14 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0