title: How to create a cronjob to backup crontab
body: <p>Is there a way I can set a cronjob to backup the crontab on a daily basis?</p>
  
  <p>The current way I'm going about this is as follows:</p>
  
  <pre><code>00 12 * * * crontab -l &gt; ~/Documents/crontab_$(date +%Y%m%d).txt
  </code></pre>
  
  <p>but it's not working at all. Issuing this in the terminal as a non-cronjob task works fine. </p>