[Django]-How can I schedule Django background task in Heroku without using Credit card or without money?

1👍

Actually, you can set up a clock process in heroku using APScheduler now.

I just tried it and it works great.

You can set up the time as you like, 1 minute is also allowed.

And it’s free.

👤mhchia

2👍

Heroku Scheduler will allow you to run background tasks for free at one of the following frequencies: every 10 minutes, every hour, or every day. It will use the same dyno type that you use for your web dyno, so if you’re using a free dyno to run your app, it will also use a free dyno to run your scheduled tasks.

Once you add it to your app, open it from your Heroku app’s Resources view. Add a new job and enter python manage.py process_tasks as the command, and select your desired frequency.

Hopefully you can make this work for your use case!

Leave a comment