using the Yii2.0 framework, the server executes the following command directly to suspend the daemon normally. At that time, it often hangs up automatically after running for a few days
nohup /phpstudy/www/llq/yii queue/start &
now a script has been written to let the system detect whether a process has failed in every minute. The script code is as follows
str=`ps -ef | grep queue/start`
str1=${str:0-33:33}
if [[ "$str1" != "/phpstudy/www/llq/yii queue/start" ]];then
-sharp
nohup /phpstudy/www/llq/yii queue/start &
fi
The problem with is that the shell script executes to nohup / phpstudy/www/llq/yii queue/start & this line of code has no effect. Script permissions have been set to 777
can"t nohup be executed in ctontab?
is there any other way to suspend the daemon for rabbitmq?