# Immediate query for custom badge that is updated daily

**URL:** https://meta.discourse.org/t/immediate-query-for-custom-badge-that-is-updated-daily/42619
**Category:** Support
**Created:** [15 april 2016 om 16:34 UTC](https://meta.discourse.org/t/immediate-query-for-custom-badge-that-is-updated-daily/42619 "2016-04-15T16:34:35Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![birarda](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/birarda/32/108186_2.png) [@birarda](https://meta.discourse.org/u/birarda)
#### Post date: [15 april 2016 om 16:34 UTC](https://meta.discourse.org/t/immediate-query-for-custom-badge-that-is-updated-daily/42619/1 "2016-04-15T16:34:35Z")

</div>

We’re adding a custom badge that will update daily (though it doesn’t really need to, it’s granted to all users created before today).

I’m wondering - when I save the badge will it trigger the initial query or will we need to wait for the “Update Daily” job to trigger?

---

<div class="post-metadata">

### Author: ![mikechristopher](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mikechristopher/32/89135_2.png) [@mikechristopher](https://meta.discourse.org/u/mikechristopher)
#### Post date: [15 april 2016 om 17:24 UTC](https://meta.discourse.org/t/immediate-query-for-custom-badge-that-is-updated-daily/42619/2 "2016-04-15T17:24:59Z")

</div>

I believe you need to wait for the daily sidekiq job to trigger it

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [15 april 2016 om 20:55 UTC](https://meta.discourse.org/t/immediate-query-for-custom-badge-that-is-updated-daily/42619/3 "2016-04-15T20:55:05Z")

</div>

There are several “Triggers”

- Update daily
- When a user acts on post
- When a user edits or creates a post
- When a user changes trust level
- When a user is edited or created
- After a post is processed

Maybe one of those would be more suitable for you?

---

<div class="post-metadata">

### Author: ![birarda](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/birarda/32/108186_2.png) [@birarda](https://meta.discourse.org/u/birarda)
#### Post date: [15 april 2016 om 21:52 UTC](https://meta.discourse.org/t/immediate-query-for-custom-badge-that-is-updated-daily/42619/4 "2016-04-15T21:52:55Z")

</div>

I’m fine with it triggering daily normally, I just want to know if there’s a way to fire the first grant manually.

---

<div class="post-metadata">

### Author: ![mikechristopher](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mikechristopher/32/89135_2.png) [@mikechristopher](https://meta.discourse.org/u/mikechristopher)
#### Post date: [15 april 2016 om 22:09 UTC](https://meta.discourse.org/t/immediate-query-for-custom-badge-that-is-updated-daily/42619/5 "2016-04-15T22:09:48Z")

</div>

Only way is to go into sidekiq and manually trigger the badge grant job as far as I’m aware

---

<div class="post-metadata">

### Author: ![birarda](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/birarda/32/108186_2.png) [@birarda](https://meta.discourse.org/u/birarda)
#### Post date: [15 april 2016 om 22:10 UTC](https://meta.discourse.org/t/immediate-query-for-custom-badge-that-is-updated-daily/42619/6 "2016-04-15T22:10:09Z")

</div>

Yeah, that would be my first move but we’re happily on a managed instance now.

---

<div class="post-metadata">

### Author: ![mikechristopher](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mikechristopher/32/89135_2.png) [@mikechristopher](https://meta.discourse.org/u/mikechristopher)
#### Post date: [15 april 2016 om 22:10 UTC](https://meta.discourse.org/t/immediate-query-for-custom-badge-that-is-updated-daily/42619/7 "2016-04-15T22:10:45Z")

</div>

I have that exact same problem sadly

Team would it be possible to build in a trigger which runs the badge grant job upon saving a new or edited badge instance?

---

<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: [17 april 2016 om 16:02 UTC](https://meta.discourse.org/t/immediate-query-for-custom-badge-that-is-updated-daily/42619/8 "2016-04-17T16:02:43Z")

</div>

> [@birarda](#):
>
> I just want to know if there’s a way to fire the first grant manually.

Go to

```
 https://YOURHOST/sidekiq/scheduler

```

Search for “badge” to find `Jobs::BadgeGrant` and click the `trigger` button. There’s a `Jobs::ProcessBadgeBacklog` too, but I’ve never needed it to trigger new badges.

---

<div class="post-metadata">

### Author: ![mikechristopher](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mikechristopher/32/89135_2.png) [@mikechristopher](https://meta.discourse.org/u/mikechristopher)
#### Post date: [17 april 2016 om 21:42 UTC](https://meta.discourse.org/t/immediate-query-for-custom-badge-that-is-updated-daily/42619/9 "2016-04-17T21:42:41Z")

</div>

Hi @pfaffman  
I believe the problem @birarda is having is that he doesn’t have access to sidekiq as it is a hosted site. Multi site installations now have access to sidekiq removed apart from the master site.

---

<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: [18 april 2016 om 10:36 UTC](https://meta.discourse.org/t/immediate-query-for-custom-badge-that-is-updated-daily/42619/10 "2016-04-18T10:36:35Z")

</div>

Oops. Thanks, @mikechristopher. I missed that part of the thread.

---

<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: [7 januari 2019 om 18:11 UTC](https://meta.discourse.org/t/immediate-query-for-custom-badge-that-is-updated-daily/42619/11 "2019-01-07T18:11:04Z")

</div>



---

<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: [13 december 2021 om 02:58 UTC](https://meta.discourse.org/t/immediate-query-for-custom-badge-that-is-updated-daily/42619/12 "2021-12-13T02:58:11Z")

</div>


