Crontab - running a scrtipt
I'll describe my problem I have my own server running which sometimes "crashes", so I thought I could check every minute and if its down - start it.
I wrote a script
Script is working If I run it manually, but if I run it through Cron.
if ! lsof | grep 6011
then /home/path/server config.xml
its not working :( Cron itself is good, because i wrote simple script creating a file, and its ok. I tried to add & at the end to run it in the BG, but it didn't help. What could be the problem ?
0-59 * * * * /home/path/server_enabler.sh