I am looking for a simple cron-type solution for java-application.
I looked at cron4j, where you can set up a method to execute, for example every 5 minutes.
Only, I have a custom requirement that, if the previous method call is still running, it should not start another simultaneous call, but just skip that call and try again in 5 mins, etc --- i.e. I want to make sure never to run 2 threads for the same job in parallel. Only if the previous method-call has completed, should a new one start.
What is the easiest/most stable way to implement this requirement in Java? (doesn't have to be cron4j if there is a better way)