In general we don’t like to run stuff ‘at boot’. While it may make sense in a single-server, non-multisite environment, stuff gets hairy at scale.
For example, if you have an autoscaling setup which adds/removes servers based on load, every one of those scale events can cause multiple servers to “boot” simultaneously. We wouldn’t want all of them to delay startup while some stats are updated.
We also like to make sure that servers can boot successfully, even if the database/redis are in a readonly state.
For this particular pfaffmanager case, do you have a custom plugin and/or discourse_docker template running on the sites? From outside Discourse, you could trigger it like:
rails runner "About.refresh_stats