#!/bin/sh
if ps aux | grep sendemail | grep -v grep ; then
    continue
else
    cd "$1" && php artisan queue:work 'jobs_emails' --queue=sendemail --daemon --delay=30 & >> "$1/queues/queues.log" 2>&1
fi

#!/bin/sh
if ps aux | grep updatequeuingloanborrowliststatustoworkinprogress | grep -v grep ; then
    continue
else
    cd "$1" && php artisan queue:work 'jobs_loan_borrow_lists' --queue=updatequeuingloanborrowliststatustoworkinprogress --daemon --delay=30 & >> "$1/queues/queues.log" 2>&1
fi

#!/bin/sh
if ps aux | grep updatequeuingloanborrowliststatustoworkdone | grep -v grep ; then
    continue
else
    cd "$1" && php artisan queue:work 'jobs_loan_borrow_lists' --queue=updatequeuingloanborrowliststatustoworkdone --daemon --delay=30 & >> "$1/queues/queues.log" 2>&1
fi  

#!/bin/sh
if ps aux | grep notifyworkerrequest | grep -v grep ; then
    continue
else
    cd "$1" && php artisan queue:work 'jobs_loan_borrow_lists' --queue=notifyworkerrequest --daemon --delay=30 & >> "$1/queues/queues.log" 2>&1
fi

#!/bin/sh
if ps aux | grep updatesearch | grep -v grep ; then
    continue
else
    cd "$1" && php artisan queue:work 'jobs_loan_borrow_lists' --queue=updatesearch --daemon --delay=30 & >> "$1/queues/queues.log" 2>&1
fi

#!/bin/sh
if ps aux | grep updateexpiredmonthlysubscription | grep -v grep ; then
    continue
else
    cd "$1" && php artisan queue:work 'jobs_subscriptions' --queue=updateexpiredmonthlysubscription --daemon --delay=30 & >> "$1/queues/queues.log" 2>&1
fi

#!/bin/sh
if ps aux | grep updateexpiredsubscription | grep -v grep ; then
    continue
else
    cd "$1" && php artisan queue:work 'jobs_subscriptions' --queue=updateexpiredsubscription --daemon --delay=30 & >> "$1/queues/queues.log" 2>&1
fi

#!/bin/sh
if ps aux | grep updateblockedsubscription | grep -v grep ; then
    continue
else
    cd "$1" && php artisan queue:work 'jobs_subscriptions' --queue=updateblockedsubscription --daemon --delay=30 & >> "$1/queues/queues.log" 2>&1
fi

#!/bin/sh
if ps aux | grep deleteunsubmittedcompanycart | grep -v grep ; then
    continue
else
    cd "$1" && php artisan queue:work 'jobs_carts' --queue=deleteunsubmittedcompanycart --daemon --delay=30 & >> "$1/queues/queues.log" 2>&1
fi

#!/bin/sh
if ps aux | grep deleteunsubmittedcompanycart | grep -v grep ; then
    continue
else
    cd "$1" && php artisan queue:work 'jobs_carts' --queue=searchremovepastdates --daemon --delay=30 & >> "$1/queues/queues.log" 2>&1
fi

#!/bin/sh
if ps aux | grep declinequeuingexpiredloanrequest | grep -v grep ; then
    continue
else
    cd "$1" && php artisan queue:work 'jobs_expired_requests' --queue=declinequeuingexpiredloanrequest --daemon --delay=30 & >> "$1/queues/queues.log" 2>&1
fi


#!/bin/sh
if ps aux | grep sendsmsreminders | grep -v grep ; then
    continue
else
    cd "$1" && php artisan queue:work 'jobs_sms_reminders' --queue=sendsmsreminders --daemon --delay=30 & >> "$1/queues/queues.log" 2>&1
fi







