I have an annotated method width @Scheduled
with an cron
of */15 * * * * ?
(run each 15 seconds).
Sometimes this process take more than 15 seconds to run.
Is there any way to avoid the call of the @Scheduled
if it's already running?
My workaround currently is a flag field in the class to signal if the process is running, and if it is marked the code exits before execute the main code.