I use the rules scheduler module (D7). So far all fine.
What I use it for:
- a user registers with username and email
- this users then gets 4 emails over the next four weeks, sent by the scheduler
BUT: In case a user wants to unsubscribe from these scheduled emails? How can I achieve it?
It is true that one can delete particular sort of scheduled tasks with the according action (Delete scheduled tasks). But I don't know how to indicate it shall only delete the tasks that are related to a particular?
When I list the schedule with ... /admin/config/workflow/rules/schedule
... there is one column called "USER PROVIDED IDENTIFIER" - maybe it would help to do it with such an identifier. But I don't know how?
UPDATE TO THE QUESTION:
I tried to import with the suggested changes, this is how my rule looks like now:
{ "rules_user_reminder_after_30_days" : {
"LABEL" : "User Reminder After 30 Days",
"PLUGIN" : "reaction rule",
"OWNER" : "rules",
"REQUIRES" : [ "rules", "rules_scheduler" ],
"ON" : { "user_login" : [], "node_insert--article" : { "bundle" : "article" } },
"DO" : [
{ "schedule_delete" : {
"component" : "rules_send_email_notification",
"task" : "[account:name]"
}
},
{ "schedule" : {
"component" : "rules_send_email_notification",
"identifier" : "[account:name]",
"param_user_to_notify" : [ "account" ]
}
}
]
}
}
But now I got this error:
Integrity check for the imported configuration failed. Error message: Missing configuration for parameter date