Scheduler | Community
Skip to main content
New Participant
January 12, 2023
Solved

Scheduler

  • January 12, 2023
  • 3 replies
  • 1208 views

Is it possible to update SCHEDULER CRON EXPRESSION value dynamically, with a value coming from an AEM component dialog ? Please help....!

 

My scenario: I need to send email and sms reminders to webinar subscribers 1 hour before the webinar starts, there will be a webinar scheduled every week and scheduler should run at that time, scheduler cron expression should be updated automatically when a time is authored for a webinar in the component.

 

 

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 arunpatidar

you can use Job manager to schedule and unschedule jobs

https://redquark.org/aem/day-18-sling-jobs/ 

3 replies

joerghoh
Employee
January 13, 2023

Hi,

 

I don't think that it should be done this way. Instead I would have the scheduler hourly and check if email needs to be sent (by checking all webinars which are not already happened). Or you could use a scheduled job as mentioned by @arunpatidar , which is probably the best way to handle this.

 

 

New Participant
January 12, 2023

You can try to access and modify osgi config for scheduler while you are authoring your component. You can either provide cron expression through authoring or make a list of pre defined cron expression and select any out of the list on the basis of auhoring value.

 

As you will commit the value in osgi config, scheduler will be configured with @9182423 annotation.

arunpatidar
arunpatidarAccepted solution
New Participant
January 12, 2023

you can use Job manager to schedule and unschedule jobs

https://redquark.org/aem/day-18-sling-jobs/ 

Arun Patidar