Basically the title - have a Django app running on the app platform and I’d like to run some basic tasks on a regular schedule. Diving into celery just for that feels like overkill so hoping there is something I can set up cronjobs for within the app platform.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Click below to sign up and get $200 of credit to try our products over 60 days!
To accomplish scheduled tasks with your Django App running on the App Platform, Cron Jobs are not natively supported as of now.
You can check our tutorial on How To Setup a Job Scheduler on DigitalOcean App Platform
A job scheduler allows you to schedule tasks at specific times, intervals, or dates, freeing you to focus on more important work. In this tutorial, we’ll show you how to set up a job scheduler in App Platform using a Docker container that runs cron as an App Platform Worker.
Use a custom worker: By defining a custom worker component in your app specification, you can run scheduled tasks using Python libraries like
APScheduler. It may have a different entrypoint for the scheduled tasks separate from your main app.
External cron services: You can use a third-party cron service to make requests to your app on scheduled intervals, triggering the tasks you want to run.
Here’s some more information on DigitalOcean App Platform. Remember to check our documentation for any updates on cron job support in the future.
Hope that this helps!