# Assign users a random digest time?

**URL:** <https://meta.discourse.org/t/assign-users-a-random-digest-time/325639>\
**Category:** Support\
**Tags:** email, activity-summary\
**Created:** [September 9, 2024, 2:08pm UTC](https://meta.discourse.org/t/assign-users-a-random-digest-time/325639 "2024-09-09T14:08:16Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![GeoffSchultz](https://avatars.discourse-cdn.com/v4/letter/g/8491ac/32.png) [@GeoffSchultz](https://meta.discourse.org/u/GeoffSchultz)\
**Post date:** [September 10, 2024, 4:37pm UTC](https://meta.discourse.org/t/assign-users-a-random-digest-time/325639/6 "2024-09-10T16:37:20Z")

</div>

> [@pfaffman](#):
>
> `psql discourse`

Thank you very much for the pointers. I decided that doing it from Rails was too much of a learning curve, so I figured out how to do it via postgres. Here was my solution:

```plaintext
./launcher enter app
su - postgres 
psql discourse
UPDATE user_stats SET digest_attempted_at = digest_attempted_at - interval '1' DAY * random();

```

---

_[View the full topic](https://meta.discourse.org/t/assign-users-a-random-digest-time/325639)._
