title: Cron doesn't run sh script
body: <p>I have a simple script that works when I manually put it into the <code>~/</code> directory.</p>
  <pre><code>#!/bin/bash
  source /opt/python/current/env
  source /opt/python/run/venv/bin/activate
  cd /opt/python/current/app
  scrapy crawl myspider
  deactivate
  exit 0
  </code></pre>
  <p>Since EBS will delete the script and crontab eventually, I need to create a  <code>config</code> file in .ebextensions.</p>
  <p>So I've created <code>cron-linux.config</code></p>
  <p>But I can't make it work. It doesn't do anything (I should see changes in a database).</p>
  <pre><code>files:
      &quot;/etc/cron.d/crawl&quot;:
          mode: &quot;000644&quot;
          owner: root
          group: root
          content: |
              * * * * *  /usr/local/bin/crawl.sh
  
      &quot;/usr/local/bin/crawl.sh&quot;:
          mode: &quot;000755&quot;
          owner: ec2-user
          group: ec2-user
          content: |
              #!/bin/bash
              source /opt/python/current/env
              source /opt/python/run/venv/bin/activate
              cd /opt/python/current/app
              scrapy crawl myspider
              deactivate
              exit 0
  
  commands:
      remove_old_cron:
          command: &quot;rm -f /etc/cron.d/crawl.bak&quot;
  </code></pre>
  <p>Do you know where is the problem?</p>
  <p>Even when I do <code>eb logs &gt; log.txt</code> and check the file, there is no such word like 'crawl', 'cron' etc...</p>
  <p><strong>EDIT</strong></p>
  <p>I can even manually run the script: <code>[ec2-user@ip-xxx-xx-x-xx ~]$ /usr/local/bin/crawl.sh </code>
  And I see that it works. Just the cron doesn't work.</p>