Expand my Community achievements bar.

SOLVED

AemaaCS - scheduler execution best practices on publish

Avatar

Level 10

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 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@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

View solution in original post

9 Replies

Avatar

Employee Advisor

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.

 

Avatar

Level 10

@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 

Avatar

Level 10

Thanks @Jörg_Hoh  appreciate the suggestion. I noticed an implementation with asset share where schedulers were executed on pub and suggested by Adobe on 6.5 for a client ; as much as I realize it’s a no no I wanted to still ask this to confirm  the right way to move ahead and wrt AEMaaCS 

thank you once again ..

Avatar

Employee Advisor

There might be reasons why a scheduler is mandated; it's definitely not a No-Go, but that decision needs to be driven by the project requirements. The same applies to AEM CS.

Avatar

Correct answer by
Community Advisor

@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

Avatar

Level 4

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

 

Avatar

Level 4

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.

Avatar

Level 10

This is helpful and I would keep this in mind since folks are still unknowingly using the old approach and I would have as well until you raised this 

fyi @Jörg_Hoh  good catch by @sarav_prakash