【发布时间】:2020-12-14 18:01:53
【问题描述】:
我有脚本“delete_elk_index”,其中包括:
curl -XDELETE 'http://ip:9200/index0'
手动执行时可以,但是在crontab中设置时不起作用。
crontab 日志是:
MAIL (mailed 55 bytes of output but got status 0x004b from MTA#012)
我已经看到 [https://superuser.com/questions/1478754/crontab-job-log-message-shows-a-error-status-0x004b-from-mta012][1]
然后我更改我的 crontab :
*/1 * * * * /root/delete_elk_index.sh>/dev/null 2>&1
crontab 日志变成:
CMD (/root/delete_elk_index.sh)
但是索引没有被删除。 如何在 crontab 中设置?
【问题讨论】:
标签: elasticsearch curl cron