12-08-2007
you can 'sleep' for specified amount of time as well,
"man sleep" for details.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I guess I posted in wrong forum before. How do I pause another process and then restart it on linux? The other process doesn't listen for anything.
Thanks for any help you can offer.
Dane :confused: (1 Reply)
Discussion started by: daneensign
1 Replies
2. UNIX for Dummies Questions & Answers
Hello,
How can i check? How many corn jobs are running?
Thanks Raghu.K (1 Reply)
Discussion started by: raghuk2
1 Replies
3. Shell Programming and Scripting
Hi, i facing a problem when run the script below..
while
do
if
then
printf "Please enter a name : "
read response # the problem occur here
if
then
ea_ident=${omc_ident}
else
#
# Check that name does not contain invalid... (14 Replies)
Discussion started by: neruppu
14 Replies
4. UNIX for Dummies Questions & Answers
well is gets stuck and i dont know why.......
pid=fork();
if(pid==0)
{
pause();
write(1,"child",5);
exit(0);
}
else
{
sleep(1);
kill(pid,SIGCONT);
write(1,"parent",5);
wait(0);
}
all=1; (1 Reply)
Discussion started by: IdleProc
1 Replies
5. Shell Programming and Scripting
Hi there,
I'm writing a script to restore 3 directories and 3 mysql db's every 24 hours. While writing the script, I came across the thought...
Do I need to pause between executions?
Example:
msql restore1.sql
rm -Rf path1/*
cp -Rf path1/* /restore1
chmod 777 /folder1/cache1
... (2 Replies)
Discussion started by: semiotics101
2 Replies
6. Shell Programming and Scripting
Hi,
I've written a shell script to take photos with my camera.
After every picture taken, the picture is transmitted to the computer via usb and then deleted on the camera.
But sometimes there's an error and the picture is not deleted and so, after a certain time, the camera chip will be... (4 Replies)
Discussion started by: McLennon
4 Replies
7. Shell Programming and Scripting
Hi,
I am sorting a file, but getting different output with crontab.
input file-file
z
Z
x
X
y
Y
when I sort manually
sort file
x
X
y
Y
z
Z (4 Replies)
Discussion started by: suresh3566
4 Replies
8. Shell Programming and Scripting
Hi,
I recently would like to write a shell script that
1. Runs in the background (can be done with "&", but i'd be happy for other solutions to keep programs running)
2. Does its stuff
3 THEN checks a specified folder for a size change over time (say, each 5 seconds. AND ONLY continues with... (9 Replies)
Discussion started by: pasc
9 Replies
9. UNIX for Dummies Questions & Answers
Hi,
I new to cron job...
I need to schedule a job that runs on a particular day at a specific time
say for example need to send a test mail at around 2:30PM on wed 10th August
i have used the below syntax, but the job was not executed.
30 14 * * * echo "message from UNIX... (3 Replies)
Discussion started by: ch33ry
3 Replies
10. Shell Programming and Scripting
6) printf "\n GoodBye! \n\n"; exit ;;
I am trying modify the above command to pause a couple of seconds before exiting, so a message can be displayed. Thank you :). (8 Replies)
Discussion started by: cmccabe
8 Replies
SLEEP(3) Linux Programmer's Manual SLEEP(3)
NAME
sleep - Sleep for the specified number of seconds
SYNOPSIS
#include <unistd.h>
unsigned int sleep(unsigned int seconds);
DESCRIPTION
sleep() makes the calling thread sleep until seconds seconds have elapsed or a signal arrives which is not ignored.
RETURN VALUE
Zero if the requested time has elapsed, or the number of seconds left to sleep, if the call was interrupted by a signal handler.
CONFORMING TO
POSIX.1-2001.
BUGS
sleep() may be implemented using SIGALRM; mixing calls to alarm(2) and sleep() is a bad idea.
Using longjmp(3) from a signal handler or modifying the handling of SIGALRM while sleeping will cause undefined results.
SEE ALSO
alarm(2), nanosleep(2), signal(2), signal(7)
COLOPHON
This page is part of release 3.25 of the Linux man-pages project. A description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
GNU
2010-02-03 SLEEP(3)