I would like to request one or two site settings where we can configure a “time window” and “digest days” when the digests jobs are queued.
The reason for this request is that for most sites, including our site, we have a dominate geographic area for users; for example ours is the US, others might be Korea, Brazil, Germany, Australia or any region on the planet.
Sending out digest emails would be more efficient if they could be sent out during normal business hours and days (for the main user base). Many sites pay for bulk mail services like MailGun or SendGrid to send out digests email; and so having those digest emails arrive in the inbox of members “around” say “10 AM on Monday” is much better than arriving at “3AM on Saturday”.
These jobs are queued and so having one or two configuration variables like “digest queuing time window” and “digest queuing permitted days” would make the money spent on sending out digest emails more efficient.
I searched core on GitHub and could not find any way to set these important parameters. Did I miss them?
Out of the box, Discourse will send the digest at the same hour the user completes a 7 day inactivity period, meaning the email will align with a window the user was active in the site. This is great because it will automatically adapt to each user and timezone.
A very common problem is around imports where admins forget to disable digests from imported users or forget to import last active hour in the imported data and everything is set to midnight.
LOL. You hit the nail on the head regarding our issue! Our imported users had their last activity set at the time they were imported into Discourse from our legacy vB site.
In our case, the Discourse scripts we used did not do this; and we cannot “forgot” to do something we have no idea about in the first place, LOL.
Hindsight is 20/20 as they say.
I don’t think most users who are migrating to Discourse for the first time from a legacy forum can forget “before they know the details how Discourse digests work”
It’s not a big deal. But as you say yourself:
Hence, the feature I am requesting would help mitigate the problem for migrated forums, those mostly “unsupported souls” out there in cyberspace who are generally “on their own” when they migrate a forum to Discourse
Since, I am guessing this “common problem” will not be addressed, can you please post a link to the code in the repo where I can write a plugin to monkey patch this issue for us lost migration souls who “forgot to do something” before we “ever knew we needed to do it” ?
Or maybe never mind and instead of a monkey patch I will write Ruby script to simply change the time of the “last activity” for the migrated users to a time during normal business hours (just add 10 hours to midnight and it’s done!)
I just updated all these legacy users to have their last_seen_at dates / times align to 10AM EST.
Based on how I read your reply, this will queue their digest emails for around that time in the AM, 10AM.
Correct?
Update:
Hmmm. It does not seem to work. After setting the last_seen_at dates-times to 10AM EST, sidekiq is queuing the digests now, at just after midnight EST; and the admin panel email sent logs showing the digests being sent out now as well.
This magically “last activity alignment” to the time the digests are sent out does not appear to be working as described on my end.