Created
February 9, 2016 14:31
-
-
Save zgabievi/7bb7476d463045e6349f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
LOG=/path/to/logs/COMMAND.log | |
while true; do | |
nohup /path/to/php /path/to/artisan COMMAND >> ${LOG} & | |
PID=$! | |
echo [`date +%Y-%m-%d:%H:%M:%S`] ${PID} STARTED >> ${LOG} | |
wait ${PID} | |
echo [`date +%Y-%m-%d:%H:%M:%S`] ${PID} ENDED >> ${LOG} | |
done; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Change PATHs and COMMANDs on your purpose