title: script from cron doesn't run
body: <p>I have a script:</p>
  
  <pre><code>-rwx------. 1 root root 135 Oct 15 12:00 /backup/purge.sh
  </code></pre>
  
  <p><br /></p>
  
  <pre><code>#!/bin/bash
  volume=`echo "list volumes" | bconsole|grep -i "Append\|Full"|awk '{print $4}'`
  echo "purge volume=$volume yes" | bconsole
  </code></pre>
  
  <p>If I run it manually it runs.</p>
  
  <p>If I put the script to crontab it doesn't run, however the log says it ran.</p>
  
  <pre><code>Oct 15 16:07:01 sdfdsfdsf CROND[36326]: (root) CMD (/backup/purge.sh)
  </code></pre>
  
  <p>The schedule:</p>
  
  <pre><code>07 16 * * * /backup/purge.sh
  </code></pre>
  
  <p>If I run manually:</p>
  
  <pre><code>/backup/purge.sh
  Connecting to Director weewr:9101
  1000 OK: 1 werewrewrewr Version: 7.0.5 (28 July 2014)
  Enter a period to cancel a command.
  purge volume=Vol-0001 yes
  
  This command can be DANGEROUS!!!
  
  It purges (deletes) all Files from a Job,
  JobId, Client or Volume; or it purges (deletes)
  all Jobs from a Client or Volume without regard
  to retention periods. Normally you should use the
  PRUNE command, which respects retention periods.
  Automatically selected Catalog: MyCatalog
  Using Catalog "MyCatalog"
  1 File on Volume "Vol-0001" purged from catalog.
  There are no more Jobs associated with Volume "Vol-0001". Marking it purged.
  </code></pre>