Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
execute shell file every 30 seconds
Name: jenny.han Date: December 8, 2003 at 02:26:42 Pacific OS: UNIX CPU/Ram: 24G
Comment:
Hello,
Urgent! I need to build a UNIX script that calls a PL/SQL every 30 seconds.
I can not use crontab to realize it, right? Then how can I fulfil? I have no much knowledge about UNIX script.
Name: David Perry Date: December 8, 2003 at 05:16:48 Pacific
Reply:
If you have a wrapper script with a loop and a sleep function you can spawn another process whenever you like.
i=0 while [ $i -lt 10000 ] ; do if [ `date +%S` -eq 0 -o `date +%S` -eg 30 ] ; then echo "do something" fi sleep 1 ((i=i+1)) done
0
Response Number 2
Name: David Perry Date: December 8, 2003 at 05:17:32 Pacific
Reply:
Oops. typo. that should read -eq not -eg
0
Response Number 3
Name: jenny.han Date: December 8, 2003 at 19:17:29 Pacific
Reply:
Thanks David,
It seems functional. Thanks so much.
Here I'd like to know a little more. Your code only runs 10000 times, right? If I want the shell command to run repeated, is it a good way to combine with using crontab file?
Jenny
0
Response Number 4
Name: WilliamRobertson Date: December 10, 2003 at 15:42:07 Pacific
Reply:
Is there some reason you can't do the whole thing within Oracle using DBMS_JOB?
Summary: The script below will launch a tail command in background, then every 30 seconds it checks the inode of a.log to see if it is the same file that the current tail command is processing. When it is not...
Summary: I have a common shell script file need to be accessed from several files in other directories. Time is urgent, although I know there are two ways for me to do this, but I don't know how. 1. write ex...
Summary: I am kind of a newbie to UNIX... how do you execute shell scripts? I created a new file called test and copied the script from a website. I tried fiddling around with chmod (chmod +rwx test) command, ...