I am working on a simple Spring console application (it is a litle batch working on a database).
This batch is scheduled to start at specific time. The problem is that the execution of this program can take a lot of time and the scheduler can try to start it before the previous instance of this program completed its work.
So I think that I can use a lock file to handle this situation, my idea is:
Do you think that it could be a valid approach to the problem? Or Spring provide some smarter way?
Another doubt is: what is the standard for a lock file? Can I create simply a .lock file in the current folder?