Highlighted

AEM Scheduler | AEM Community Blog Seeding

Avatar

Avatar

kautuk_sahni

Community Manager

Total Posts

5.5K

Likes

959

Correct Answer

1.1K

Avatar

kautuk_sahni

Community Manager

Total Posts

5.5K

Likes

959

Correct Answer

1.1K
kautuk_sahni
Community Manager

18-05-2020

BlogImage.jpg

AEM Scheduler by aemlearninghub

Abstract

AEM Scheduler is a service which is used to schedule jobs in AEM Application. We can write a scheduler service in AEM by two different ways.

1:- Using Scheduler API
2:- Using Whiteboard Pattern

We can create our scheduler class using SCR Annotaions or using New OSGi R6 Annotaions. From AEM 6.2 SCR Annotations are deprecated now.So we will only use OSGi Annotaions to create our scheduler.

Writing scheduler class using Whiteboard Pattern:-
In this case we will use the normal Java thread API to schedule a job.
In example below we are scheduling a job for every 2 seconds. We have given cron expression as */2 * * * * ?.
We can take help of http://www.cronmaker.com/ to create your cron expression easily.

Read Full Blog

AEM Scheduler

Q&A

Please use this thread to ask the related questions.

AEM AEMEBlogSeeding Experience Manager

Replies

Highlighted

Avatar

Avatar

Ankur_Khare

MVP

Avatar

Ankur_Khare

MVP

Ankur_Khare
MVP

18-05-2020

Hi,

 

While writing schedulers i hope you have written environment specific configs for these schedulers did you ever face below issue-

1. Configs doesnt get reflected until they are saved manually into felix console.

If you have faced such an issue what was your solution to that.?