title: Cronjobs run differently (correctly) when command typed at console
body: <p>I have encountered a strange problem with crontab: I have correct entries in crontab, have set my path correctly, and yet still when the jobs are run through crontab, they run differently (e.g. log files are not produced, and data is not written to file). However, when I type the <strong>EXACT</strong> commands at the command line, the scripts work as intended. </p>
  
  <p>This is not likely a permissions problem, as I am running the cronjobs as myself.</p>
  
  <p>Here are the relevant details:</p>
  
  <h3>Crontab entries:</h3>
  
  <pre><code>0,30 8-18 * * 1-5 python /home/rascal/work/skunkworks/scripts/python/downloaders/make_whoopy.py
  
  0,30 7-18 * * 1-5 /home/rascal/work/skunkworks/scripts/python/scrapers/funny_quotes.sh
  
  0,30 7-20 * * 1-5 /home/rascal/work/skunkworks/scripts/python/scrapers/even_funnier_quotes.sh
  </code></pre>
  
  <h3>/var/log/syslog entries (filtered for CRON)</h3>
  
  <pre><code>Nov  1 09:00:01 BIGBERTHA CRON[8998]: (rascal) CMD (/home/rascal/work/skunkworks/scripts/python/scrapers/funny_quotes.sh)
  Nov  1 09:00:01 BIGBERTHA CRON[8999]: (rascal) CMD (/home/rascal/work/skunkworks/scripts/python/scrapers/even_funnier_quotes.sh)
  Nov  1 09:00:01 BIGBERTHA CRON[9004]: (rascal) CMD (python /home/rascal/work/skunkworks/scripts/python/downloaders/make_whoopy.py)
  Nov  1 09:09:01 BIGBERTHA CRON[9306]: (root) CMD (  [ -x /usr/lib/php/sessionclean ] &amp;&amp; /usr/lib/php/sessionclean)
  Nov  1 09:09:01 BIGBERTHA CRON[9313]: (root) CMD (  [ -x /usr/lib/php5/maxlifetime ] &amp;&amp; [ -x /usr/lib/php5/sessionclean ] &amp;&amp; [ -d /var/lib/php5 ] &amp;&amp; /usr/lib/php5/sessionclean /var/lib/php5 $(/usr/lib/php5/maxlifetime))
  Nov  1 09:17:01 BIGBERTHA CRON[9495]: (root) CMD (   cd / &amp;&amp; run-parts --report /etc/cron.hourly)
  </code></pre>
  
  <h3>Environment (on Server machine running cron jobs)</h3>
  
  <pre><code>rascal@BIGBERTHA:~/work/skunkworks/scripts/python/scrapers$ which python
  /usr/bin/python
  rascal@BIGBERTHA:~/work/skunkworks/scripts/python/scrapers$ which bash
  /bin/bash
  rascal@BIGBERTHA:~$ which scrapy
  /usr/local/bin/scrapy
  </code></pre>
  
  <h3>funny_quotes.sh</h3>
  
  <pre><code>#!/bin/bash
  
  . /home/rascal/.profile
  
  cd /home/rascal/work/skunkworks/scripts/python/scrapers
  
  scrapy crawl funny_quotes
  </code></pre>
  
  <h3>Running in command prompt ...</h3>
  
  <pre><code>rascal@BIGBERTHA:~$ /home/rascal/work/skunkworks/scripts/python/scrapers/funny_quotes.sh 
  2017-11-01 09:57:05 [scrapy.utils.log] INFO: Scrapy 1.4.0 started (bot: scrapers)
  2017-11-01 09:57:05 [scrapy.utils.log] INFO: Overridden settings: {'NEWSPIDER_MODULE': 'scrapers.spiders', 'SPIDER_MODULES': ['scrapers.spiders'], 'BO
  T_NAME': 'scrapers'}
  2017-11-01 09:57:05 [scrapy.middleware] INFO: Enabled extensions:
  ['scrapy.extensions.memusage.MemoryUsage',
   'scrapy.extensions.logstats.LogStats',
   'scrapy.extensions.telnet.TelnetConsole',
   'scrapy.extensions.corestats.CoreStats']
  ...
  </code></pre>
  
  <p>Why are jobs being run differently through cron?</p>