Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

AEM Cloud: is scheduler run on each instance?

Avatar

Avatar
Ignite 10
Level 4
TB3dock
Level 4

Likes

34 likes

Total Posts

203 posts

Correct Reply

4 solutions
Top badges earned
Ignite 10
Boost 25
Give Back 25
Validate 10
Validate 1
View profile

Avatar
Ignite 10
Level 4
TB3dock
Level 4

Likes

34 likes

Total Posts

203 posts

Correct Reply

4 solutions
Top badges earned
Ignite 10
Boost 25
Give Back 25
Validate 10
Validate 1
View profile
TB3dock
Level 4

06-05-2021

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?

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,114 likes

Total Posts

3,148 posts

Correct Reply

1,072 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,114 likes

Total Posts

3,148 posts

Correct Reply

1,072 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile
Jörg_Hoh
Employee

06-05-2021

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.

Answers (1)

Answers (1)

Avatar

Avatar
Springboard
Level 7
KiranVedantam1992
Level 7

Likes

174 likes

Total Posts

183 posts

Correct Reply

55 solutions
Top badges earned
Springboard
Give Back 5
Ignite 1
Affirm 50
Validate 1
View profile

Avatar
Springboard
Level 7
KiranVedantam1992
Level 7

Likes

174 likes

Total Posts

183 posts

Correct Reply

55 solutions
Top badges earned
Springboard
Give Back 5
Ignite 1
Affirm 50
Validate 1
View profile
KiranVedantam1992
Level 7

06-05-2021

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