Bash script for calling Java programs -



Bash script for calling Java programs -

i have jar file can phone call next way: java -jar myjar.jar param1 param2 param3

now need bash script waits until clock time reached (e.g. 5pm) , calls jar file several times, lets 5 times (so have 5 jvms running). moreover, arguments passed bash script should passed jar. then, after times (e.g. 10 minutes), started java programs should killed.

how can this?

thank much.

a bash script waits until clock time reached (e.g. 5pm) , calls jar file several times, lets 5 times

update: many glenn jackman, incorporated reply

#!/bin/bash cat<<endblock | @ 5pm in {1..5}; java -jar myjar.jar "$@" & pid=$! { sleep 600 && kill $pid; } & done endblock

java bash automation

Comments

Popular posts from this blog

maven fortify plugin : Unable to load build session with ID XXXXX .. See log file for more details -

c# - Primavera WebServices does not return any data -

android - Display emoji panel with genymotion - keyboard/touch input? -