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

Anatomy of the Ideal Background Job

Avatar

Avatar
Validate 1
Level 5
dan_klco
Level 5

Likes

53 likes

Total Posts

88 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Shape 1
Ignite 5
Ignite 40
Ignite 30
View profile

Avatar
Validate 1
Level 5
dan_klco
Level 5

Likes

53 likes

Total Posts

88 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Shape 1
Ignite 5
Ignite 40
Ignite 30
View profile
dan_klco
Level 5

14-08-2018

I've seen and written a lot of background jobs in my career and in my experience, they are most common culprits to hard-to-diagnose issues in website operations. This is why, with background jobs, it's even more important than your standard component code to ensure the job executes successfully.

Here's what I see as the "ideal" Background Job in AEM:

Anatomy of the Ideal Background Job | Perficient Digital

Replies

Avatar

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,089 likes

Total Posts

3,121 posts

Correct Reply

1,063 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,089 likes

Total Posts

3,121 posts

Correct Reply

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

14-08-2018

The ideal background job is no background job 🙂

Or make it a workflow, so it can be controlled via the authoring interface. And you're lost if you have to run such jobs in all publishs with the very same result.

Good writeup, thanks Dan!

Jörg

Avatar

Avatar
Validate 1
Level 5
dan_klco
Level 5

Likes

53 likes

Total Posts

88 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Shape 1
Ignite 5
Ignite 40
Ignite 30
View profile

Avatar
Validate 1
Level 5
dan_klco
Level 5

Likes

53 likes

Total Posts

88 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Shape 1
Ignite 5
Ignite 40
Ignite 30
View profile
dan_klco
Level 5

15-08-2018

Very true! As much as possible, getting functionality out of background jobs is beneficial.

Regarding workflows, they are nice if this is a job that requires / supports user interaction, but for workflows which are launched based on Listeners, the same problem applies with background jobs. Workflows provide some UI features, but it still requires someone to be looking. If you created a launcher workflow, creating a Health Check to monitor that workflow would still be a good idea.