-
May 2nd, 2008, 10:26 AM
#1
Launching a job when a file system change
I have a use case. I want to start a spring batch job if a certain file appeared in a directory. Is that Spring Batch currently support such use case?
Also, an alternate use case is that we have a long runner daemon like job to monitor on a directory. Upon any new file come in, the job will process it and delete it. After that, the job still keeps running and continue to monitor the directory.
Is that Spring Batch can support this kind of usage?
-
May 2nd, 2008, 11:23 AM
#2
In theory you could right a step that with directory polling if you like, but what you're really getting into is the realm of scheduling. Quartz, for example, has directory listeners that can kick off a Spring Batch job for the same net effect, and I think an approach like that is preferable to trying to code a step to do the same. It's not that it isn't possible, but rather there's better ways to do it.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules