I have found relatively little info about schedulers in AEM, but I understand you can schedule them like cron jobs, e.g. run every 5 mins.
With AEM cloud, Adobe take care of spinning up additional instances as required by load.
In this case, will multiple copies of each scheduler be run? Or does AEMN have some kind of master and slave schedule service, so each scheduler only runs once?
The same question applies to ehcache - does each publish instance get its own copy of the cache?
Solved! Go to Solution.
Views
Replies
Total Likes
By default the scheduler runs on all instances, and that's not different at all to any on-prem and AMS based environment. For clustered instances (like the authoring instances in AEM as a Cloud Service) you have the option to run it only on the master.
The documentation available at https://sling.apache.org/documentation/bundles/scheduler-service-commons-scheduler.html is quite good and explains also howto run a scheduled job only once per cluster.
Hi @TB3dock,
Schedulers are event handling mechanism which can run on the instance as per the cron job provided. They would run on the instance if the code is present in them - even though adobe creates some extra instances [which would be a backup or replica of existing instances]
To know more on the annotations of different event handling mechanisms please check my blog here.
Hope this helps!
Thanks,
Kiran Vedantam
Views
Replies
Total Likes
By default the scheduler runs on all instances, and that's not different at all to any on-prem and AMS based environment. For clustered instances (like the authoring instances in AEM as a Cloud Service) you have the option to run it only on the master.
The documentation available at https://sling.apache.org/documentation/bundles/scheduler-service-commons-scheduler.html is quite good and explains also howto run a scheduled job only once per cluster.
@Jörg_Hoh in your reply you state that this works for AEM authoring instances on AEMaaCS. However, does this work if we want to run a job on the AEM publish tier leader (ie. run on exactly one publisher regardless of AEM's auto-scaling)? It's a bit difficult to test this early to confirm as we'd need to release to staging (since AFAIK there's no way to simulate auto scaling on dev envs). Thank you!
Views
Replies
Total Likes
Hi,
currently it is not possible to run a job exactly once on the publish tier. In my opinion this hardly makes sense especially because you typically want to execute this operation when ALL publishs have received some content, and currently this is not possible to know on the publishs themselves.
Views
Replies
Total Likes
Hi Jörg_Hoh,
As we know in schedulers we can use the concept of Leader to make it run only on one author instance. But can this be handled for workflow launchers as well, so that it runs only on one instance?
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies