AemaaCS - scheduler execution best practices on publish | Community
Skip to main content
Level 9
May 18, 2024
Solved

AemaaCS - scheduler execution best practices on publish

  • May 18, 2024
  • 3 replies
  • 2080 views

Hello all

 

when using AEMaaCS any suggestions or recommendations on best practices for the executing scheduler on publisher ? I don’t like to use it but I know folks use it for link purge etc 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by aanchal-sikka

@nitrohazedev 

 

  • Ideally we shouldn't be executing any write operations on publish. They should be done on Author. Thus, as with Sling jobs, I would suggest to user schedulers on author.
  • Do not create long running tasks via Schedulers
  • Make it fail-safe, incase the scheduler is interrupted by CM deployments or other Cloud activities.

Majority of the recommendations will be similar to Sling JObs

 

3 replies

joerghoh
Adobe Employee
Adobe Employee
May 19, 2024

I don't think that the suggestions for scheduler usage are fundamentally different than on AEM 6.x; an in both cases you need to be aware that each publish instance executes the scheduled job on its own. That means, that any if these jobs run outbound requests, each publish will send these outbound requests.

 

Level 9
May 19, 2024

@aanchal-sikka @sarav_prakash Thank you both ! Helped further confirm my belief on it. I see folks running it on pub which is misleading IMO as well. The job consumer bit is new @sarav_prakash  in AEMaaCS a gem 

aanchal-sikka
Community Advisor
aanchal-sikkaCommunity AdvisorAccepted solution
Community Advisor
May 19, 2024

@nitrohazedev 

 

  • Ideally we shouldn't be executing any write operations on publish. They should be done on Author. Thus, as with Sling jobs, I would suggest to user schedulers on author.
  • Do not create long running tasks via Schedulers
  • Make it fail-safe, incase the scheduler is interrupted by CM deployments or other Cloud activities.

Majority of the recommendations will be similar to Sling JObs

 

Aanchal Sikka
sarav_prakash
Community Advisor
Community Advisor
May 19, 2024

Directions pointed below are correct. DONOT run jobs on publisher. Publisher is intended for delivery, background jobs on publisher might badly impact your website performance. 

 

Ideally should run jobs at author and replicate to keep publishers in sync with author. 1 learning we found when writing schedulers in AEMaaCS is to use Sling Scheduled Jobs and NOT Sling Commons scheduler. Explained in this article. https://medium.com/@bsaravanaprakash/stop-creating-sling-scheduler-in-aemcaas-instead-c5d688154f58

 

Level 9
May 19, 2024

@sarav_prakash  Assuming this is for author ?

sarav_prakash
Community Advisor
Community Advisor
May 19, 2024

Correct @nitrohazedev , its for AEMaaCS coz the problem we run into is unique for Cloud world. And Sling jobs is generic for author or publisher. But as adviced, write only in author.