2

I have a mapreduce job as a 'jar' ,that should be run daily. Also, I need to run this jar from a remote java application. How can I schedule it: i.e, I just want to run job daily from my remote java application.

I read about Oozie, but I dont think it is apt here.

rdonatoiop
  • 1,185
  • 1
  • 14
  • 28
Tom Sebastian
  • 3,373
  • 5
  • 29
  • 54

3 Answers3

1

Take a look at Quartz. It enables you to run a standalone java programs or run inside an web or application container (like JBoss or Apache Tomcat). There is a good integration with Spring and Spring batch in particular.

Quartz can be configured outside of the java code - in XML and the syntax is exactly like in crontab. So, I found it very handy.

äSome examples can be found here and here.

aviad
  • 8,229
  • 9
  • 50
  • 98
0

I am not clear about your requirement. You can use ssh command execution libraries in your program. SSH library for Java If you are running your program in linux environment itself, You can set some crontab for periodic execution.

Community
  • 1
  • 1
Amal G Jose
  • 2,486
  • 1
  • 20
  • 35
0

If the trigger of your jar is your java program, then you should schedule your java program hourly rather than the jar. And if that is separate, then you can schedule your jar in Oozie workflow where you can have the java code execution in step one of oozie workflow and jar execution in the second step.

In oozie, you can pass the parameters from one level to another as well.Hope this helps.

-Dipika Harwani