skip to Main Content

So currently, I’m trying to create a bot that messages every 5 minutes using python-telegram-bot JobQueue. The app is deployed on heroku and it seems to be working just fine. But sometimes it doesn’t message me after periods of inactivity (ex. not using /start with the bot) How do I solve this issue ? When I check the log it seems to be running fine. Thanks !

2

Answers


  1. This sounds like you’re using a Heroku instance on a free web dyno which "sleeps" after 30 minutes of inactivity. You can see more information on that here: https://devcenter.heroku.com/articles/free-dyno-hours#dyno-sleeping

    Login or Signup to reply.
  2. Instead of worker python bot.py use clock python bot.py in the Procfile

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search