Results 1 to 2 of 2

Thread: restarting job question

  1. #1

    Default restarting job question

    Hi,

    I am having pretty much this same problem: http://forum.springframework.org/showthread.php?t=55621

    I have to run the same job 4 times a day, the problem is that a failed job should keep restarting if it fails, so if I have a run at 8 am and it fails, the next run at 11 am should continue from there, since each run produces a flatfile that must have a summary header, a failed file is useless and we would lose data.
    Please I need some ideas on how to work around this.

    Thanks,
    Angel

  2. #2
    Join Date
    Dec 2006
    Posts
    1,061

    Default

    You'll need to do a bit of wrapping of the JobLauncher, unless your scheduler already handles it for you. Most enterprise schedulers will handle this using exit codes to determine if a job was successful, and if so, incrementing a value when it runs the job again (or a date). If you don't have access to such a scheduler, you'll need to wrap how you launch the job with similar logic, using a database table to record if the last job was successful. (Hopefully in 2.0 we can provide some better hooks for this)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •