title: Cronjob File system error handling in PHP
body: <p>I have tons of scripts wich run in background via cronjob and many frontend stuff happening. Some weeks ago we had a system fatal error where our mounted drives have been fried and our cronjob got stuck... we had to restart the whole system and even go so far to restart the rack oldstyle. </p>
  
  <p>The problem is that our debian instance was partually "kaput".</p>
  
  <p>Some of the files got a total permision lock and hat no permisioins at all, when you run ls /sys/crontab/lock it had no permisions but the cronjob was still runing and making tons of problems. 
  The worst part is tht the php was still runing and the mysql server was up and runing, even without the file system permisions(And was making orders without the files... BIG problem). Talk about to reliable.</p>
  
  <p>Now my question is is there a way if i can detect if a debian system is working? </p>
  
  <p>Except trying touch on every script run, or writing locks in the DB. </p>