title: no mdadm -D output in crontab
body: <p>I have the following script:</p>
  
  <pre><code>#!/bin/bash
  # wait, just in case hdd md0 in not mountet yet    
  sleep 30 
  # write Raid state in log-file
  mdadm -D /dev/md0 &gt; /home/main_usr/myScripts/raidHealth.log
  #just check if it writes to the file
  echo "just a Test" &gt;&gt; /home/main_usr/myScripts/raidHealth.log  
  </code></pre>
  
  <p>I´ve done the following things:
  1. made file executable 2. changed owner to root 3. wrote script into crontab (sudo crontab -e | @reboot /home/main_usr/myScripts/checkRaid.sh)</p>
  
  <p>So heres my Problem:
  When I run the script, everything works just perfect. But when I reboot my Computer the script runs, but my .log file just contains "just a Test". No output of the mdadm-command. I can´t explain why the mdadm-command is empty in this case. Maybe someone can help me out.</p>
  
  <p>I also should mention that I need sudo to run the script (mdadm-command)</p>