Cronjob component on the app platform

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?

Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Also, same dilemma!

I think using Docker and setting cronjobs in the yaml configuration is the best alternative.

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.