I have a system where some jobs are time based e.g. occur every n minutes and some jobs are quantity based e.g. happen every time value x reaches n.
I have hit an issue where jobs for the same target are running concurrently i.e. a time based job and a quantity based job which causes consistency issues.
I use the @DisallowConcurrentExecution annotation on the job but the job details/job keys are different so this doesn't accommodate my situation.
Is there a standard way of dealing with this situation or do I need to implement my own method of ensuring jobs for the same target don't collide?