• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Jigar Naik
Ranch Hand
Posts: 762
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ?
 
Maurizio Nagni
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1923
Linux Postgres Database Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
... and there is a slash missing between bin and java.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic