Say I want to send an email after a user makes some changes, but I don’t want to inundate them with emails for every single change. I want to ‘batch’ the notifications, so that some amount of time, say 10 minutes, has to pass before the email is sent.
What’s the best way to do this? Use
setTimeout on the server? Will this thread effectively?