It has to be trivial, but I just cannot get through it. I have to limit amount of tasks (let\'s say connections, emails sent or clicks in the button) per amount of time. So
You can create a persistent counter for every user. Every time you receive a request (for sending an email) you need to check the value of the counter and the date of the counter creation.
Only in the last two cases the request is executed.