I want to create a cront tab to restart my delayed_job server if it breaks.
how may check that my delayed_job server is running or not with ps command?
how may i create a cron tab to check this thing work? Like if my server break than cron tab will restart it. I want to set cront tab to check it every 5 minute.
This is my script which check if pid files is created or not. If pid file is not exist than it will start the delayed_job server.
I have created my script in my application root folder
This is my script delayed_job.sh
And i have set this script on crontab like this.
It’s working fine. If i break delayed_job server than it will automatically start my delayed_job server. Is it a proper way??