91
Views
4
Comments
Reminder Email
Application Type
Reactive

Hello Guys, 

 I have a requirement of sending the reminder mails to user who has their activity scheduled before 15mins or 5 mins or at the time of event based on that user setting. 

I am trying to use timer for this.  I like to know how to trigger the timer. My idea is to wake the timer in the server action associated with same timer itself like a loop. Because we need to check all the time whether any reminder mails we need to send at that particular time. 

Also I have some doubts.

 Example :

           I need to send a remainder mail exactly at 10:15, consider  current time is 10:14 ,if we check whether we need to send any remainder mail at 10:14, but this process takes long time to complete by that time it completes  it passes 10:15,so I cant send a mail exactly for 10:15.


Please suggest your ideas. Thanks in advance. 

2023-10-21 19-42-11
Tousif Khan
Champion

Hello

You can use timer for back ground process, you can add time and create your logic in such a way so that your timer will execute basis on the setting of the user. 

If you want to sent email immediately you can use button click and add a email action. to it.

hope this will get you some idea

Thanks
Tousif Khan

2025-05-14 08-11-29
Aakash Baskar

Hello Tousif,

Yes I am using timers only. But I dont want to send email at any predefined time or onclicking action of any button. I need to run this timer all minutes through out the day.So that it will check whether to send mail for this particular time minute.   

2021-10-09 07-57-44
Stefan Weber
 
MVP

Hi,

To perform an action on a particular time where each instance of an action can have an individual time, then the only built in way to do so is to use a BPT Process. This is one way how you could do it:

Create a process that takes some input parameters like

* Recipient (Mailaddress of the recipient)

* SendMailOn (DateTime when to send the mail)

Add an Automatic Activity and set the Start Date property to the SendMailOn Input parameter.

Anywhere in your application use the Launch<YourProcess> to trigger the process. The process instance will wait until the SendMailOn time is reached and then perform any action you defined within the automatic activity.

Be aware that there are some seconds discrepancy between trigger and execution. Also note that this is full process instance because of two reasons. Manual launching a process is always a full process instance and never a light BPT and as soon as you are using the Start Date property of an automatic activity the process is again a full process instance. Per frontend server you can run 20 process instances concurrently. Waiting is not running, so you can have an infinite number of "pausing" instances.

Best

Stefan

2024-12-18 16-06-42
Junaid Syed

Hello Aakash,

First of all, I would not suggest you to run the timer round the clock every minute, this would be wastage of resources. Here are some suggestions I have

1. Make the timer run at least once either by scheduling it or forcing it from service center or some logic in the code.

2. After timer runs using any options above, implement the logic to calculate when should the next reminder be sent out and accordingly set Next Run attribute for the timer in Cyclic_Job entity.

Above should properly take care of calculating the next run based on reminders configured till the logic explained in Step 2 executes. However, there is one more possible below scenario - 

Let say the time now is 10:15 when timer runs for first time, the next reminder is supposed to go out at 11:00, the Step 2 logic sets the next run time as 11:00. In the mean time another user has configured his reminders such that next reminder for him must go out at 10:45. Now if the timer's Next Run is not updated the 10:45 reminder will be missed. To handle this you need to implement the Step 2 logic in the reminders configuration logic too so that based on user configuration the timer's Next Run also gets updated.

Coming to your other concern about not being able to send out the reminder as configured because of delay in processing. It is a possibility,  although scheduler does its best to run the timers as scheduled but that is not guaranteed specially if you have long running timers. Keeping that in mind, I would suggest you to keep sufficient buffer time between reminder notification and user's activity, probably should not be less than 5 minutes.

Hope it helps!

Junaid

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.