# 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:** 5

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [September 9, 2024, 8:15pm UTC](https://meta.discourse.org/t/assign-users-a-random-digest-time/325639/5 "2024-09-09T20:15:10Z")

</div>

You want to do it from Rails rather than modify the database directly.

But you could

```plaintext
./launcher enter app
su - postgres 
psql discourse

```

and have at it.

You can look at [Administrative Bulk Operations](https://meta.discourse.org/t/administrative-bulk-operations/118349) and, I think, find some examples that look like

```plaintext
users=User.where(something)
users.each do |user|
   user.update(field: value)
end

```

---

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