2

So, I have a content type "contest" which has an "end date" field. I want to setup rules so the author of a "contest" gets an e-mail as a reminder that the contest ended.

As event I used "Cron maintenance tasks are performed" and as condition I try to use "Data Comparison" to check the value of the end date to be smaller than current site time. The problem is I can't use the token of the "end date" field as my event is not node-related. I tried to add a "Content is of type" condition, but also here, I can't select anything node-related.

I feel like overlooking something small but I've been searching now several hours and could use some help..

2 Answers 2

3

Assuming you are using Drupal 7.

You need to enable the Rules Scheduler module, it comes with Rules.

Then for Rule event use After saving new content.

Add condition, content is of type: Contest

Exit out of your Rule, and now create a Rule Component of Data Type: Node

Add condition, content is of type: Contest

Action Send E-mail.

Now exit the component and go back to your rule, for action, schedule rule component, and use your end-date field for schedule evaluation date.

I highly suggest you watch Introducing Rules Scheduler and I am sure my answer will make more sense to you.

1
  • Thanks a lot for the help. It's an interesting tutorial. I have to do some testing but it seems that Rules scheduler can achieve what I am looking for.
    – Apoc
    Jan 4, 2017 at 14:41
2

To further complete the previous answer, you may also want to look at the answer to "Rule to store user's last post date and scheduled rule based 30 day reminder" (which is a variation of your question here).

It includes a Rules Component (in Rules export format) which, with some minor tweaking, should work for you also. And it includes a Rule (also in Rules export format) that schedules the Rules Component. Just replace the field_next_article by your node's field date and you should be close. And replace the Rules Event and/or Condition(s) with what fits for your case.

Also note that this Rule takes care of "rescheduling" such eMail in case the data field gets updated somehow ...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.