This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.

AnnouncementAnnouncement Module

Collapse

No announcement yet.

How do you shutdown spring batch and allow an application to exit?Page Title Module

How do you shutdown spring batch and allow an application to exit?

Aug 15th, 2011, 12:08 PM

My application is going to be called by a CRON job to do some background processing and I am using Spring Batch to wire up what processing needs to be done. I found that even after all my jobs are run, my application does not exit. I need to do a System.exit(0) to force the application to stop. This doesn't seem right. How can I shutdown spring batch when I'm done with it so my application can exit?