The pricing of the app platform starts with $5. And I do need a cronjob component for my Laravel apps, though each cronjob component is $5. To set up my (D)TAP envs (3 envs) I need 3x this component. Is this the only way to go, or is there a way to share this component on all my apps or only the (D)TAP envs?
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!
Just to clarify, we don’t have a cronjob type of component available on App Platform yet, so I assume you are using a worker and orchestrating the cron job yourself.
As far as supporting your various environments in the cron job, you would need to create a separate component and modify the environment variables accordingly for each component. We don’t have any concept like environments to accomplish what you described above.
The only other option I can think of would be to pass in all relevant environment variables (possibly with a prefix like STAGING_...) and then orchestrate your cronjob to be able to handle of the various types of environment variables based on the prefix.
Also, same dilemma!
I think using Docker and setting cronjobs in the yaml configuration is the best alternative.
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.