title: cron a simple test script with debian, screen and ec2
body: <p>I am trying to learn cron here (sorry if the question is 101!). So, I have a small test script like so:</p>
  
  <pre><code>#! /bin/sh
  # /home/admin/js/test.sh
  #
  SHELL=/bin/bash
  source ~/.bashrc
  
  # Some things that run always
  screen -d -r myscreen
  touch /home/admin/js/testsuccess.txt
  exit 0
  </code></pre>
  
  <p>then I do <code>crontab -e</code> and add the following entry (I am running debian 7 on ec2):</p>
  
  <pre><code>*/15 7-23 * * * root /home/admin/js/test.sh &gt; /dev/null 2&gt;&amp;1
  </code></pre>
  
  <p>so.. this basically runs every 15 mins within the time specified. The cron seems to run, i.e when I do:</p>
  
  <pre><code>grep CRON /var/log/syslog
  </code></pre>
  
  <p>I see the output:</p>
  
  <pre><code>Oct 26 19:30:01 ip-16-653-987-12 /USR/SBIN/CRON[20700]: (admin) CMD (root  /home/admin/js/test.sh &gt; /dev/null 2&gt;&amp;1)
  </code></pre>
  
  <p>..but I do not see the <code>touch</code> new file in the directory. Not sure what is really going on here - any advice to solve this would be greatly appreciated!
  Thanks.</p>