Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

HB_BHF's avatar

Setup Laravel Scheduler on AWS Instance

Is there some tutorial how to setup cron job on AWS (with Laravel Scheduler)? Simple example would be great, for example how to update (increase by one) MySQL DB column value every minute.

0 likes
2 replies
fideloper's avatar
Level 11

To clarify, CRON on aws isn't different than any other server. (It's something you can add to the server, but isn't offered as a AWS specific service, - altho you can approximate it with some of their offerings)

On most server types, you can:

  1. Add an entry to /etc/crontab
  2. Add a crontab-stye file to /etc/cron.d
  3. Add an executable script to one of /etc/cron.daily, cron.hourly, cron.monthly, cron.weekly
  4. Use crontab -e to edit a cron that's specific to your currently logged in user (or other users if you can use sudo, e.g. sudo crontab -u someuser -e

Then you can add an entry to run the scheduler, something like this (taken from the docs)

* * * * * php /path-to-your-project/artisan schedule:run >> /dev/null 2>&1
3 likes

Please or to participate in this conversation.