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…
I set a new crontab job, like this:
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) > 1 ) b )" >> /tmp/cron_job.log
but nothing seems to be logged, so i supposed its not working.
Theres no problem with the sql sentence, thats not the issue here.
Anything wrong with my cron rule?
well, since the mysql was not working properly directly inside crontab (thought that i think that was a path issue like Alex Howansky said), i created a php file dealing this query and called the php in crontab, much easier, and give me the option to use conditions.
the cron job:
the php:
Thanks for all the help.