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
To extract data of a perticular interval (date-time wise) abhishek27 Shell Programming and Scripting 3 07-03-2008 03:32 AM
Generating files with time interval of fifteen minutes aajan Shell Programming and Scripting 0 09-25-2007 02:54 AM
change time interval for /proc/loadavg calculation Rakesh Ranjan High Level Programming 2 05-12-2006 05:48 AM
Shell Script Run Interval to be dynamic rahulrathod Shell Programming and Scripting 5 12-19-2005 06:18 PM
Time Wait interval eloquent99 SUN Solaris 1 12-05-2003 09: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 11-20-2008
himvat himvat is offline
Registered User
  
 

Join Date: Nov 2008
Posts: 68
script to run repeatedly after a fixed interval of time

Hi ,

I am working on the following script . I want this script to run and scan the log file repeatedly after 3 hours. This script will run & scan just for the current date logs and after every 3 hours. Kindly advice what to add in this script for this purpose.

#!/bin/sh
diff common.log common.log.1 > DIFFERENCE.log
cp common.log common.log.1
grep "DEBUG" DIFFERENCE.log
if [ $? -eq 0 ]; then
echo "1"
else
echo "0"
fi



Regards
  #2 (permalink)  
Old 11-20-2008
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,800
Learn to use crontab. This will let you schedule a job at intervals.
  #3 (permalink)  
Old 11-20-2008
iamgeethuj iamgeethuj is offline
Registered User
  
 

Join Date: Apr 2008
Posts: 38
You can use cronjobs...
  #4 (permalink)  
Old 11-20-2008
sharadpisal sharadpisal is offline
Registered User
  
 

Join Date: May 2008
Posts: 28
Crontab can help you
try 'man 5 crontab'
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 01:29 AM.


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