title: How can i set a crontab to execute a mysql query and log the output?
body: <p>Well, title self describes it..
  I need to run a sql function to clean some duplicated posts, i need to do it several times a day so i need to use cron...</p>
  
  <p>I set a new crontab job, like this:</p>
  
  <pre><code>00 16,18,19,20,21 * * * mysql -h MY-DB-HOST.COM -u MY-DB-USERNAME -pMY-DB-PASSWORD -e "delete from hotaru_posts where post_id in ( select post_id from ( select post_id from hotaru_posts a group by post_title having count(post_title) &gt; 1 ) b )" &gt;&gt; /tmp/cron_job.log
  </code></pre>
  
  <p>but nothing seems to be logged, so i supposed its not working.</p>
  
  <p>Theres no problem with the sql sentence, thats not the issue here.</p>
  
  <p>Anything wrong with my cron rule?</p>