Skip to content

Instantly share code, notes, and snippets.

@sadiqsalau
Created February 2, 2025 15:19
Show Gist options
  • Save sadiqsalau/15a3adf887e4ee1da9168e832405d7ab to your computer and use it in GitHub Desktop.
Save sadiqsalau/15a3adf887e4ee1da9168e832405d7ab to your computer and use it in GitHub Desktop.
Laravel EC2 Ubuntu Crontab
# Start Server
@reboot cd /home/ubuntu/laravel-app && screen -dmS server php artisan serve --host 0.0.0.0
# Send Server IP Address
@reboot cd /home/ubuntu/laravel-app && php artisan app:send-server-address >> /dev/null 2>&1
# Run Scheduled Commands
* * * * * cd /home/ubuntu/laravel-app && php artisan schedule:run >> /dev/null 2>&1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment