# 安排每周摘要

**URL:** https://meta.discourse.org/t/schedule-weekly-digest/168415
**Category:** Support
**Tags:** activity-summary
**Created:** [2020年十月27日 16:55 UTC](https://meta.discourse.org/t/schedule-weekly-digest/168415 "2020-10-27T16:55:32Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![TorqueWrench](https://avatars.discourse-cdn.com/v4/letter/t/73ab20/32.png) [@TorqueWrench](https://meta.discourse.org/u/TorqueWrench)
#### Post date: [2020年十月27日 16:55 UTC](https://meta.discourse.org/t/schedule-weekly-digest/168415/1 "2020-10-27T16:55:32Z")

</div>

有没有办法安排每周摘要的发送时间？

我原本以为 Discourse 的摘要机制是按每位用户独立计算的：系统会记录用户上次访问的时间，并在该时间点之后 X 天（例如每周摘要为 7 天）发送摘要。但我不确定这是否仍然适用，因为查看我的已发送邮件时，我发现每周摘要似乎是在同一时间统一发送的。

不幸的是，这些每周摘要发送的时间并不理想。如果我能自行安排每周摘要的发送时间，我认为可以更好地提升用户参与度。请问这是否可行？

我做过的相关研究：

> [@Digests all sending at the same time](https://meta.discourse.org/t/digests-all-sending-at-the-same-time/95257):
>
> So I had an issue a long time ago where our digest emails stopped working for a extended period of time (I set the ‘suppress digest email after days’ value too high as I wanted to disable it, but this prevented all digest emails from sending). Now a huge amount of digest emails are clumped together and get sent out on the same day, at the same time. It’s quite a bit of a shotgun and SMTP providers are not a fan. I believe this also caused an issue where a large amount of bounced emails were re…

- 这让我觉得每周摘要本不应出现这种行为。

> [@Digest email to be sent on schedule only](https://meta.discourse.org/t/digest-email-to-be-sent-on-schedule-only/75663):
>
> For slower VPS servers and bigger number of community members, sending digest emails may clutter sidekiq jobs queue. Combined with a possibly slow SMTP server and hight user activity at peak hours, this may lead to sidekiq get stuck, which will affect user “notifications” experience. I’d like to propose a setting to control during which hours sending queued digest emails can be executed. For many communities residing in a single country (e.g. Australia) or a single region (e.g. Europe), there…

- 该帖子未收到任何回复。

提前感谢，  
TorqueWrench

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [2020年十月27日 17:05 UTC](https://meta.discourse.org/t/schedule-weekly-digest/168415/2 "2020-10-27T17:05:21Z")

</div>

> [@TorqueWrench](#):
>
> 我曾以为 Discourse 摘要的工作方式是：针对每个用户记录最后访问时间，并在该时间点之后经过 X 天（例如每周摘要为 7 天）发送摘要。不过，我不确定目前是否仍如此，因为

情况确实如此。

每 30 分钟，我们会计算那些已离线 7 天的用户并发送摘要。

发生变化的是一些针对数日无新帖子的站点进行的性能优化：

> <https://github.com/discourse/discourse/commit/c0293339b87c39bbd2b91f87e2d39179f40c9a9a>
>
> Previously, Jobs::EnqueueDigestEmails would enqueue a digest job for every user,… even if there are no topics to send. The digest job would exit, no email would send, and last\_emailed\_at would not change. 30 minutes later, Jobs::EnqueueDigestEmails would run again and re-enqueue jobs for the same users.
> 
> 120fa8ad introduced a temporary mitigation for this issue, by randomly selecting a subset of those users each time.
> 
> This commit adds a new \`digest\_attempted\_at\` column to the \`user\_stats\` table. This column is updated every time a digest job completes for a user. Using this, we can avoid scheduling digest jobs for the same user every 30 minutes. This also removes the random user selection in 120fa8ad, and instead prioritizes users who had digests attempted the longest time ago.

这可能会改变摘要的频率，但主要影响的是处于极端情况的社区，即新帖子极少或有很多用户不访问站点的社区。

---

<div class="post-metadata">

### Author: ![TorqueWrench](https://avatars.discourse-cdn.com/v4/letter/t/73ab20/32.png) [@TorqueWrench](https://meta.discourse.org/u/TorqueWrench)
#### Post date: [2020年十月27日 17:15 UTC](https://meta.discourse.org/t/schedule-weekly-digest/168415/3 "2020-10-27T17:15:06Z")

</div>

这就说得通了，谢谢！

那就是我的帖子，因为我主要把 Discourse 用作评论提供者。

似乎有人对能够安排每周摘要感兴趣（如果您需要，我可以整理一份其他论坛帖子的列表）。Discourse 方面会对这个功能感兴趣吗？（这并不承诺您一定会进行开发。）我认为这将有助于缓解此处请求的许多功能需求：

> [@Any mass email functionality?](https://meta.discourse.org/t/any-mass-email-functionality/14202):
>
> Am I just being silly in not being able to find it?

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [2020年十月27日 17:24 UTC](https://meta.discourse.org/t/schedule-weekly-digest/168415/4 "2020-10-27T17:24:52Z")

</div>

这不在我们的路线图内，因此您最好的选择是在 #Marketplace 频道委托定制专属插件。

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [2020年十一月26日 17:34 UTC](https://meta.discourse.org/t/schedule-weekly-digest/168415/5 "2020-11-26T17:34:17Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
