The server I work on had an ungraceful shutdown due to power failure but when it came up my application didn't come up since the pids for the services before shutdown still existed. This impacted services on my server and I am looking for a way to create a cronjob that will look for existing pid files on boot and if they exist delete them.
Asked
Active
Viewed 28 times
0
-
1Are you probably looking for the @reboot primitive in the crontab? – Edoardo Vignati Dec 03 '19 at 14:14
-
Well I am looking for a way of deleting the stale pid files using @reboot primitive in a cronjob – Mark Wamiru Dec 03 '19 at 15:16
-
Have you already checkout this? https://stackoverflow.com/questions/40205638/detecting-a-stale-pid-file-in-a-unix-environment – Edoardo Vignati Dec 03 '19 at 15:18