Report this

What is the reason for this report?

Cron jobs for app platform

Posted on October 8, 2020

Is there a way to launch a cron job in 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.

It’s not working.

I added the code but my deployment keeps failing after I added this worker

đŸ‘‹ @john375105

A cron jobs feature is on our roadmap, though I don’t have a public release date as of right now. In the meantime, one option is to run a Worker component that acts as a cron job.

If you needed something the runs continuously you could use a worker with a run command like:

while true; do
    echo "=> Running scheduler"
    php artisan schedule:run || true;
    echo "=> Sleeping for 60 seconds"
    sleep 60;
done

Any news of how to set a cronjobs in the app plataform?

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.