Hi,
I am building an application with Jmix 2.3 that synchronizes users mailboxes with their respective accounts in Microsoft Office 365. In particular, every user is allowed to view his/her emails from the Jmix application and reply or forward them… Since this application is used by more than 100 users that are receiving daily a large number of emails, I want to isolate the email synchronization process for each user by creating a separate quartz job that will be responsible to receive & send all email items for a single account. Thus, what I need is when a new user mailbox is created in the application then a process will run and create a new job with a respective trigger that will also accept as data the name of the particular mailbox in order for the synchronization process to run. Can this scenario be implemented in Jmix? I have found in the documentation that a job can be programmatically created at startup of the application but there is no relevant documentation for generating at runtime any number of jobs. If this is not possible, is there any other workaround that will help me implement the aforementioned scenario?
Hello,
yes it’s quite possible.
I use it to quartz schedule some alarms for the users, when it triggers it sends notification.
To do that, I have:
ScheduledAlarmJob annotated as a component, implementing Job - this is the class to perform my action
AlarmSchedulerService - service to schedule the execution of ScheduledAlarmJob