How to stop Your Heroku app from sleeping😴 (FREE)

Search for a command to run...

Nice writeup. I would recommend, rather then relying on a third party service, there are a few possible methods you can try -
Your thoughts?
Yes this is a good solution which most of them use Pankaj. Most of my articles are targeted for beginners who are just starting out and using Kaffeine Shots is extremely simple
Glad that it was helpful
Linux Commands are like GTA Cheatcodes. People with great memory remember them by heart and weaker ones write them down. I am a hybrid, I used to remember most of the linux commands and GTA Cheatcodes but I don't have them byheart anymore Here is why...

Job-Stash is an alternative to node-schedule that persists job, supports atomic execution and has inbuilt retry mechanism

Here is how I wrote this blog post. I remembered things I contributed last year. made them into points and started expanding on how anyone can implement/learn that. Then realised the blog post is getting long :) Anyways, Hey everyone, I am Hrithwik, ...

I spent the last week improving the performance of a few APIs at work and improved response Times by 5X. I just did 3 basic things which improved performance in most of the API routes. This blog is really helpful especially if you are new to Javascri...

A few days back, I uninstalled the Twitter app and switched to the web app and I noticed something, Twitter had like a different/modern Installation UI for its PWA. (Know more about PWAs here.) I was like, Woah, this looks so dope and better than t...

Few months back I built a tool called richurl.tech which is like a url shortner 🔗 but with super power ⚡ . When someone clicks on the richurl, it sends them directly to the YouTube app instead of opening videos on FB/Instagram/Linkedin Broswer.
The backend API was deployed on heroku. It's a cloud platform as a service where you can deploy apps built using python, node, Go, and many more.
If you are on a free tier on Heroku your app sleeps if it is not active for more than 30 minutes. But My back-end should never sleep since it causes delay to wake up the server and defeats the whole purpose of simplifying the user flow through the service.
Here is how I fixed it
Adding a credit card on heroku gives you total 1000 hours/month , allows you to deploy more than 5 apps and allows custom domain mapping all for FREE.
There are many ways on the internet by which you can stop your heroku from sleeping but by far this is the simplest way on the internet.
Follow this only if you have more than 750hours of dyno time since you won't run out of monthly quota.
Visit Kaffeine Shots and enter your heroku app. It basically pings your app every 30 minutes once and doesn't make it sleep except for the minimum 6 hours which is mandatory.

If you don't want this to continue or running out of quota then you can even stop this.
Hobby Dynos
Hobby Dynos are same as free dynos but they never sleep by default.
They cost $7/month but if you are a student like me you can sign up for GitHub Students beneifts and can get free hobby dynos for 2 years .
Currently I am using Hobby Dynos since I am a student.
That's it folks. If you have a friend who is a youtuber . Ask him to try out Rich URL while sharing his links on social media platform. I am very close to 100 followers on hashnode. Click on Follow :)
I am also available for free lance gigs or Full time offer. You can contact me on Twitter or on Linkedin
