AEM as Cloud Service - Scheduler Trigger Twice
I have created a scheduler which looks for the content fragment and updates its properties once a day. The job works okey on local cloud sdk. But on cloud environment; scheduler is getting activated twice and as it tries to update same content fragment it throws "javax.jcr.InvalidItemStateException: OakState0001: Unresolved conflicts" error.
The code looks like this
@Component(immediate = true, service = Runnable.class,property = {
"scheduler.expression=0 0 2 ? * *"
})
public class TestScheduledTask implements Runnable {
How can i make job trigger only once on cloud environment?