Supervisor

Install

apt-get install supervsisor
yum install supervisord

start and stop

Status

systemctl status supervisord

Enable at bootup

systemctl enable supervisord

Disable at bootup

systemctl disable supervisord

Start

service supervisord start
service supervisor start

more

 Sample config

edit /etc/supervisor/conf.d/program1.conf

[program:screenshot1]
command=/usr/bin/php7.0-sp /srv/users/serverpilot/apps/urlwin-cli/app/bin/run.php cli grabScreenshotToQueue monitor hourly
directory=/srv/users/serverpilot/apps/urlwin-cli/app/bin
stdout_logfile=/srv/users/serverpilot/apps/urlwin-cli/storage/log/screenshot1.log
stderr_logfile=/srv/users/serverpilot/apps/urlwin-cli/storage/log/screenshot1.err
redirect_stderr=true
autostart=true
autorestart=true

supervisorctl

$ supervisorctl 
$ supervisorctl reload
$ supervisorctl start programname
$ supervisorctl stop programname