|
|
How to trigger a job based on external event
I am using spring batch. I have an ETL process that writes records to a DB and after its completes the ETL process, it will also write a flag to PROCESS_COMPLETE table.
Now, I'd like my spring job to trigger once when both the below conditions are true
t is past 5 PM and
The FLAG has been written in PROCESS_COMPLETE table
Appreciate if someone can suggest how to achieve the above using spring batch.
you can use the Spring scheduling support (in Spring 3.0) to invoke a Java method repeatedly after 5. This Java method would check the database table and launch the batch job with the JobLauncher accordingly. |
|