Skip to content

Instantly share code, notes, and snippets.

@ChVuagniaux
Created February 7, 2018 08:58
Show Gist options
  • Save ChVuagniaux/71a90d8d38d2f668fb772937dda8b7a0 to your computer and use it in GitHub Desktop.
Save ChVuagniaux/71a90d8d38d2f668fb772937dda8b7a0 to your computer and use it in GitHub Desktop.
Run Horizon with cron
#!/bin/bash
# Start horizon supervisord if not already started
if pgrep -f 'php /var/www/artisan horizon'; then
echo "Horizon already run"
else
echo "Horizon not run, starting ..."
php /var/www/artisan horizon
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment