Computing.Net > Forums > Unix > execute shell file every 30 seconds

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

Reply to Message Icon

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.

Thanks for any of you answering my question!!!



Sponsored Link
Ads by Google

Response Number 1
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?


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: execute shell file every 30 seconds

Tailing a rollover file www.computing.net/answers/unix/tailing-a-rollover-file/5464.html

execute shell file in other dir www.computing.net/answers/unix/execute-shell-file-in-other-dir/4754.html

Executing Shell scripts? www.computing.net/answers/unix/executing-shell-scripts/1304.html