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]-How to write Sling Jobs in AEM? | AEM Community Blog Seeding

Avatar

Avatar
Establish
Community Manager
kautuk_sahni
Community Manager

Likes

1,127 likes

Total Posts

6,121 posts

Correct Reply

1,144 solutions
Top badges earned
Establish
Coach
Originator
Contributor 2
Contributor
View profile

Avatar
Establish
Community Manager
kautuk_sahni
Community Manager

Likes

1,127 likes

Total Posts

6,121 posts

Correct Reply

1,144 solutions
Top badges earned
Establish
Coach
Originator
Contributor 2
Contributor
View profile
kautuk_sahni
Community Manager

11-04-2021

BlogImage.jpg

[AEM]-How to write Sling Jobs in AEM? by Veena Vikraman

Abstract

Everyday is a new learning. I keep my eyes and ears open to learn things which I might have missed to learn. I am ashamed to say that I was not aware of Sling Jobs for a very long time. But they say "Better late than never" . This is why it is always good to work under people or architects who know the technology and want to do things the right way than the easy way .

Since I have learned the benefits of using Sling Jobs , I would like to share my learning with all who are not yet aware of this . So let's first see what is a Job and what is its benefits

As per the official documentation

Jobs (Guarantee of Processing)
In general, the eventing mechanism (OSGi EventAdmin) has no knowledge about the contents of an event. Therefore, it can't decide if an event is important and should be processed by someone. As the event mechanism is a "fire event and forget about it" algorithm, there is no way for an event admin to tell if someone has really processed the event. Processing of an event could fail, the server or bundle could be stopped etc.
On the other hand, there are use cases where the guarantee of processing is a must and usually this comes with the requirement of processing exactly once. Typical examples are sending notification emails (or sms), post processing of content (like thumbnail generation of images or documents), workflow steps etc.

Read Full Blog

[AEM]-How to write Sling Jobs in AEM?

Q&A

Please use this thread to ask the related questions.

AEM AEMEBlogSeeding Experience Manager