title: Why is Crond unable to find my shell script?
body: <p>I have a Dockerfile as below and I am trying to run a python script every 15 minutes but getting the error shown below</p>
  
  <pre><code>docker logs 7e1
  run-parts: can't execute '/etc/periodic/15min/startjob': No such file or directory
  </code></pre>
  
  <p>I am able to verify that the <code>run-parts --test</code> works ok.<br>
  The cron files and python files seem to be available in the docker container.</p>
  
  <pre><code>docker exec -it 7e1 /bin/sh
  / # run-parts --test /etc/periodic/15min/
  /etc/periodic/15min/startjob
  / # ls -lrt /etc/periodic/15min/startjob
  -rwxr-xr-x    1 root     root           201 Jul  6 04:09 /etc/periodic/15min/startjob
  / # ls -lrt /app
  total 8
  -rwxr-xr-x    1 root     root            10 Jul  5 17:36 requirements.txt
  -rwxr-xr-x    1 root     root           290 Jul  5 17:38 pyapp2.py
  / # 
  </code></pre>
  
  <p>-------Dockerfile-----------</p>
  
  <pre><code>FROM python:3.7-alpine
  COPY requirements.txt /
  RUN pip install -r /requirements.txt
  COPY cronscript.sh /etc/periodic/15min/startjob
  RUN chmod a+x /etc/periodic/15min/startjob
  COPY src/ /app
  CMD [ "crond", "-l", "2", "-f" ]
  </code></pre>
  
  <p>--------cronscript.sh--------</p>
  
  <pre><code>#!/bin/sh
  echo "started $(date)" &gt;&gt; /tmp/job.log
  echo "Job started: $(date)"
  # Add additional instructions
  python /app/pyapp2.py
  echo "Job finished: $(date)"
  echo "ended $(date)" &gt;&gt; /tmp/job.log
  </code></pre>
  
  <p>Any pointers are greatly appreciated. Thanks</p>