I have a node of content type task which has a field reminder date. When the node is saved or updated, I want to schedule sending an email to list of users on reminder date.
I have used the Rules module for that, like so:
- Rules events:
- after node is saved
- after node is updated
- Rules conditions:
- node is of type task
- data comparison: site current date greater than reminder date
- Rules actions:
- add a variable
- field list of users(it is entity reference field user is the entity)
- new. variable members to email
- added a loop
- to variable members to mail
- add action to loop : send mail
The problem encountered is as follows: if I set current date equal to reminder date, then the email is never sent. But when I set a reminder date greater than current date, the mail notification is not sent on the reminder date. I.e. after the current date becomes greater than reminder date, even if the cron is run, the mail is not sent.
I think I need to use Rules Scheduler
for that, right? How can I go about it?
I also saw a Using fields for setting evaluation time, which mentions these steps:
- Using flags to load user lists in Rules
- Scheduling a rules component from a triggered rule
- Some words about rescheduling the evaluation if the event date should change
- Using conditions to make fields available in Rules configuration
- Using a date field to set evaluation time
- Adding an offset to the evaluation (-1 day)
- Verifying the configuration by executing the action set manually
How can I implement this?
I also tried the Date Reminder module but it has a limitation that you can send email only if you manually enter the email address or it will send only to drupal user.