Announcement Announcement Module
Collapse
No announcement yet.
Interacting with a scheduler Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Interacting with a scheduler

    Hi,

    It seems that Spring Batch is asynchrnous as the following experiment which I did shows (if this assumption is wrong please correct me)...

    Code:
    System.out.println("Before calling job launcher");
    launcher.run(job, new JobParametersBuilder().addLong("jobId",jobId).toJobParameters());
    System.out.println("After calling job launcher");
    When I ran this code both my sys outs printed before my job ran. Here is the output from my console..

    Code:
    10/12/11 10:19:41:020 EDT] 00000029 SystemOut     O Before calling job launcher
    [10/12/11 10:19:41:168 EDT] 00000029 SystemOut     O After calling job launcher
    [10/12/11 10:19:41:168 EDT] 00000030 SimpleJobLaun I org.springframework.batch.core.launch.support.SimpleJobLauncher$1 run Job: [FlowJob: [name=oracleJob]] launched with the following parameters: [{jobId=152}]
    [10/12/11 10:19:41:220 EDT] 00000030 SimpleStepHan I org.springframework.batch.core.job.SimpleStepHandler handleStep Executing step: [loadARFile]
    [10/12/11 10:19:48:954 EDT] 00000030 SimpleStepHan I org.springframework.batch.core.job.SimpleStepHandler handleStep Executing step: [writeGCMFile]
    [10/12/11 10:20:02:301 EDT] 00000030 SimpleJobLaun I org.springframework.batch.core.launch.support.SimpleJobLauncher$1 run Job: [FlowJob: [name=oracleJob]] completed with the following parameters: [{jobId=152}] and the following status: [COMPLETED]
    So if SB is asynchronous then how can it be managed by an outside scheduler (like Quartz or CA workload autmoation). How can the scheduler know that job A is done and now I have to kick off job B?

    Thanks in advance for any help.

  • #2
    Hi,

    Anyone have any thoughts on this?

    Thanks.

    Comment


    • #3
      Hi Jehan,

      u can use the commandline to execute the job.

      u can make a bat or shell script using that commandline, and use that script as the source for autosys/CA.

      Comment

      Working...
      X