problem is the dynos share env variables, so it’s a bit difficult… and they can’t really talk to each other… can you scale to 2X dyno? or are you already there?
you might be able to use the heroku scheduler and a mix task, but I’m not 100% on how to set that up…
or you can use the $DYNO env var - although it’s experimental and other things… https://devcenter.heroku.com/articles/dynos#local-environment-variables
another although hacky way is to use a 3rd party cron service… I remember doing this in the past with a RoR heroku setup… something like the free plan here https://www.easycron.com/user/register and then “ping” an (protected) endpoint that does the background job (of course check in the db for last run etc so it fits your purpose)…
not optimal by any means - but works:/