-
Member
I would like to setup a Cron job to check weather X process is running
I would like to setup a Cron job to check weather X process is running or not. if it is not running then start that X process with a log message....
can any one help writing a script?
thanks
-
-
Re: I would like to setup a Cron job to check weather X process is running
Sure, just set the cron jobs just like Chumpy does in the cabal tg script or generate them online.
Also to find out if the process is running check it like this: ps -A | grep -q "ProcessName", check exit code of that command. If exit code is zero means that the process is still running. Then just start it by normally invoking it.
As for logging just echo a string to a file using append. echo "test" >>" $filename".
If you need more help let me know.
-
Member
Re: I would like to setup a Cron job to check weather X process is running
I can send the command, I'm kind of new thing these do not quite understand
excuse my english
* * * * * /root/cabaldallas.txt
can someone make a turotial here more or less with solution