So Im trying to run a cron job inside a docker container built with a simple dockerfile setup as an app platform. However, building is always successful but I always get a failed deployment due to a health check error and then the docker container is stopped. How can I disable this health check or preventing it from stopping the docker container? Or is there any other workaround or better solution? Thank you in advance
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!
I don’t think that’s possible.
Having said that, most probably the issue is coming from something small. It can be some mismatched ports or something equally small. Take this question for example:
Hello,
I believe that when creating your App component, you can specify the “Resource Type” to be a worker:
https://docs.digitalocean.com/products/app-platform/concepts/worker/
As workers can not accept HTTP requests, they are suitable for doing background tasks, just as in your usecase.
Hope that this helps!
Best,
Bobby
Hi,
We recently launched Scheduled Functions (it’s in beta currently) which accomplishes what you’re looking to do. Scheduled Functions are not yet supported via App Platform Function components, so you would need to create a stand-alone Cloud Function which calls the API of your App Platform Service. Alternatively, you can do whatever work you need to do inside the function as long as it is within the runtime length limits of Functions (15 min max).
https://docs.digitalocean.com/products/functions/how-to/schedule-functions/
Hope this helps,
Elan
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.