In a nutshell, I'm trying to stop my users from getting e-mailed more than once per day.
- I have some rules set up that will e-mail users when content particular to them is updated.
- I have added a Boolean field to user profiles that starts off 'checked' (1) - indicating they have not (yet) been emailed today.
Any rules that e-mail users will first check this user profile value and proceed only if they haven't been e-mailed (field value is 1), but then set this Boolean value to 0 using set a data value in Actions - thus they won't get e-mailed again until the value is changed.
What's the best/easiest way to 'reset' that field in ALL user profiles periodically? (probably once a day)
i.e. at 10:00PM set the boolean field "field_user_not_emailed_today" for ALL users to 1. (checked)
I've seen VBO recommendations for this sort of thing, but seems unnecesary given the ALL users thing. Is there perhaps a PHP snippet I could call in Rules that would do the trick?