When does the daily task for the 'Reader' badge run?

Per the solution about why users may not see a Reader Badge awarded, I was wondering how I might figure out when exactly the daily task for the Reader Badge is run?

I’ve entered my discourse app and looked at the /shared/log/rails/production.log, but I wasn’t finding much. There also doesn’t seem to be a crontab for this task. (crontab -l returns nothing relevant)

Any insight on how to figure out when it runs? And is UTC or a specific timezone? Thanks! :slight_smile:

If it helps, I think the job is scheduled in /discourse/blob/main/app/jobs/scheduled/badge_grant.rb.

I’m not experienced in ruby though, so take that with a grain of salt!

See /sidekiq and the look for the job name that your found. You can force it to run and then it’ll run the same time the next day.

I’m sorry, I’m not exactly following… I don’t know anything about sidekiq or rails :sweat_smile:

I’ve tried to list out all the scheduled jobs in discourse:

ss = Sidekiq::ScheduledSet.new
ss.map{|job| job['args']}

=> [[{"topic_id"=>19, "current_site_id"=>"default"}],
 [{"topic_id"=>17, "current_site_id"=>"default"}],
 [{"type"=>"user_posted",
   ...
   "current_site_id"=>"default"}],
 [{"type"=>"user_replied",
  ...
   "current_site_id"=>"default"}],
 [{"post_id"=>1386, "current_site_id"=>"default"}],
 [{"type"=>"user_posted",
   ...
   "current_site_id"=>"default"}],
 [{"type"=>"user_replied",
   ...
   "current_site_id"=>"default"}],
 [{"post_id"=>1385, "current_site_id"=>"default"}]]

but it doesn’t seem to be there. Granted, perhaps I ran that command wrong (answer 3 on SO).

Any tips? Does the badge grant job not run by default?

Appreciate your help!

visit https://yourforum.com/sidekiq

Oh thank you! Solves everything :slight_smile: