my dog learned polymorphism*
The moose likes Linux / UNIX and the fly likes unix script for executing jar file thrice a day... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "unix script for executing jar file thrice a day... " Watch "unix script for executing jar file thrice a day... " New topic
Author

unix script for executing jar file thrice a day...

Jigar Naik
Ranch Hand

Joined: Dec 12, 2006
Posts: 755
Hi,

I want to run MasterCard.jar file on 3 different time in a day on unix system.

and i have no experience in writing unix scripts.

can anybody guide me for the same.

i have gone through one thread : Writing unix scropt for executing jar file

and have created one file named cron.sh with the folloing script



Am i going on right direction ??? and what else i need to do ???

and how will this cron.sh get executed ???
one thing i'm wondering in this scriot is that there is nothing mentioned like everyday when to execute jar file.

I want my jar file to be executed thrice a day (10 AM,2PM and 6 PM)

do i have to mention this thing in script ? or unix command will execute cron.sh thrice a day ?


Jigar Naik


Maurizio Nagni
Ranch Hand

Joined: May 29, 2004
Posts: 75
you are partially right and partially wrong....
partially right because you wrote a small file with the bash command you want to execute
partially wrong because you didn't use the CRON command

for a clear expaination check this like FOR SURE it will help

http://www.unixgeeks.org/security/newbie/unix/cron-1.html

ciao
Stefan Wagner
Ranch Hand

Joined: Jun 02, 2003
Posts: 1923

... and there is a slash missing between bin and java.


http://home.arcor.de/hirnstrom/bewerbung
 
 
subject: unix script for executing jar file thrice a day...