title: Run docker command in bash file and run using crontab
body: <pre><code>#!/bin/bash
  
  docker exec -ti erpnext sh -c "cd /home/frappe/frappe-bench/ &amp;&amp;
  /usr/local/bin/bench backup"
  
  echo 'Hello, world.' &gt;foo.txt
  </code></pre>
  
  <p>The above code is my bash file. 
  Here have two command</p>
  
  <ol>
  <li>create txt file</li>
  <li>execute docker container</li>
  </ol>
  
  <p>If I run this command </p>
  
  <pre><code>cd /home/arifur/workspace_python/erpdatabasebackup &amp;&amp; bash backup_database.sh
  </code></pre>
  
  <p>in terminal then it is working</p>
  
  <p>But when I run in crontab </p>
  
  <pre><code>* * * * * cd /home/arifur/workspace_python/erpdatabasebackup &amp;&amp; bash backup_database.sh
  </code></pre>
  
  <p>then only txt file creation is working but docker container is not working.</p>