title: Crontab run only a part of the script
body: <p>My script <strong>test.sh</strong></p>
  
  <pre><code>#!/bin/bash
  
  source activate rsgislib_dev
  
  /home/user/anaconda2/envs/rsgislib_dev/bin/python /opt/AGR/resample.py
  
  /home/user/anaconda2/envs/rsgislib_dev/bin/python /opt/AGR/stack_bands.py
  
  
  us_1=$(/home/user/anaconda2/envs/rsgislib_dev/bin/python &lt;(cat &lt;&lt; 'EOF'
  import sys;
  import glob;
  
  us_T34TCP = glob.glob('/tmp/sen/stack_bands/*T34TCP*.kea')
  us_T34TCP_L_to_str = ''.join(us_T34TCP)
  print us_T34TCP_L_to_str
  
  EOF
  ))
  echo $us_1
  
  
  is_1="${us_1:0:71}3${us_1:72}"
  echo $is_1
  
  gdalwarp -t_srs EPSG:32633 $us_1 $is_1 -r cubic -tr 10 10 -of KEA
  
  rm $us_1
  
  source deactivate
  </code></pre>
  
  <p><strong>Cron</strong></p>
  
  <pre><code>30 12 * * * /opt/AGR/test.sh
  </code></pre>
  
  <p>The script works manually, but crontab executes only part. Execute the python script and then it stops.</p>
  
  <p>Does anyone have an idea what the problem is?</p>