10-25-2006
i would suggest the above script with a sleep interval in between for every check.
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have a UNIX daemon process that's been started by a parent process, an application server.
The behavior of this daemon process is to inherit and use the app
server's file descriptors (ports/sockets).
When I shutdown the app server, the daemon continues to run, because there may be other... (1 Reply)
Discussion started by: kunalashar
1 Replies
2. Programming
Hi ,
I want to know how to write a daemon process. I also want to know the concept behind daemon processes. Any material or sample program will be great :) .
Thanks in advance
-sg (2 Replies)
Discussion started by: sg6876
2 Replies
3. UNIX for Dummies Questions & Answers
Would you run the ‘identd' daemon on UNIX servers? can you please Explain.
thanks in advance! (3 Replies)
Discussion started by: xoxouu
3 Replies
4. Shell Programming and Scripting
hi
i want to create a daemon under unix or linux but i don't really know how so i will be grateful if you provide me links with examples or /andx how to do it
thanks (2 Replies)
Discussion started by: student00
2 Replies
5. UNIX for Dummies Questions & Answers
Hello,
I am new to this forum and this is my first post here...
I have never worked on either Pro*C or Multithreading..Now, i have to write a Pro*C, Multithreading daemon process.. I dont know where to start.. Can anybody help me with examples?
1. need to write a Pro*C multithreading... (0 Replies)
Discussion started by: kachiraju
0 Replies
6. Shell Programming and Scripting
Hi Guys,
I hope this is the right forum to post this.
I have a directory where files will be dumped at any time of the day and I want to run scripts as soon as new files come into the directory.
How can I write a daemon that detects when new files have been uploaded to the directory?
... (1 Reply)
Discussion started by: regie101
1 Replies
7. Shell Programming and Scripting
unix script must do the fiollowing
open a file containing comma delimited records
> each record contains 10 fields
> removes the 2nd field and use that same field containing fields 2 to 10
the original record after fprocessing should containing fields 1 and 3
a new erecord must be... (10 Replies)
Discussion started by: dwightja
10 Replies
8. Shell Programming and Scripting
I have scheduled a crontab job in AIX 6.1 OS to run twice in an hour which runs for the whole day to process a load.
The load which crontab kicks off needs files to arrive at a particular directory and if the files arrive, I process them.
It so happens that for the 24 times the crontab... (2 Replies)
Discussion started by: gaugeta
2 Replies
9. UNIX for Beginners Questions & Answers
My requirement is to run two scripts simultaneously.
Let say, script1.ksh is running in a loop :
example:
script1.ksh is:
for i in 1 2 3
do
script2.ksh 1 &
#psedu code which is required to write here
# if script 2.ksh is running, execute a script3.ksh (which actually check the... (2 Replies)
Discussion started by: sumitc
2 Replies
SLEEP(1) BSD General Commands Manual SLEEP(1)
NAME
sleep -- suspend execution for an interval of time
SYNOPSIS
sleep seconds
DESCRIPTION
The sleep utility suspends execution for a minimum of seconds. It is usually used to schedule the execution of other commands (see EXAMPLES
below).
Note: The NetBSD sleep command will accept and honor a non-integer number of specified seconds. This is a non-portable extension, and its
use will nearly guarantee that a shell script will not execute properly on another system.
When the SIGINFO signal is received, the estimate of the amount of seconds left to sleep is printed on the standard output.
EXIT STATUS
The sleep utility exits with one of the following values:
0 On successful completion, or if the signal SIGALRM was received.
>0 An error occurred.
EXAMPLES
To schedule the execution of a command for 1800 seconds later:
(sleep 1800; sh command_file >& errors)&
This incantation would wait half an hour before running the script command_file. (See the at(1) utility.)
To reiteratively run a command (with csh(1)):
while (1)
if (! -r zzz.rawdata) then
sleep 300
else
foreach i (*.rawdata)
sleep 70
awk -f collapse_data $i >> results
end
break
endif
end
The scenario for a script such as this might be: a program currently running is taking longer than expected to process a series of files, and
it would be nice to have another program start processing the files created by the first program as soon as it is finished (when zzz.rawdata
is created). The script checks every five minutes for the file zzz.rawdata, when the file is found, then another portion processing is done
courteously by sleeping for 70 seconds in between each awk job.
SEE ALSO
at(1), nanosleep(2), sleep(3)
STANDARDS
The sleep command is expected to be IEEE Std 1003.2 (``POSIX.2'') compatible.
BSD
August 13, 2011 BSD