Problem with crontab
Hello
I have a problem with crontab while trying to delete index from ElasticSearch using curator. I have a crontab schedule:
30 14 * * * curator (/usr/local/bin/curator --config /home/curator/.curator/curator.yml /home/curator/.curator/delete_apm_index.yml 2>&1) >/home/curator/.curator/log/logfile
Running the program in a console remove old index, however runing it from crontab logs the followin in /var/log/syslog:
Mar 7 14:30:01 lpavpvkibana2 CRON[178600]: (curator) CMD (curator (/usr/local/bin/curator --config /home/curator/.curator/curator.yml /home/curator/.curator/delete_apm_index.yml 2>&1) >/home/curator/.curator/log/logfile)
And the index is still in ElasticSearch. As a dummy test i created fie test and added next task in crontab:
30 14 * * * curator rm /home/curator/.curator/test >/dev/null 2>&1
After running from cron the file still exists... What am I doing wrong?
Additionally curator run from the console produce some output, but my syslog remains only single line.
I'm in stuck. Please help
Best regards
|