How do I use this curator-cli in crontab?

I used this to erase daily indexes

curator_cli --host --timeout 300 --port 9200 --http_auth elastic:changeme delete_indices --filter_list '[{"filtertype":"age", "source":"name", "direction":"older", "unit":"days", "unit_count":1, "timestring":"%Y.%m.%d"}]'

But how do I put it inside the crontab?
Please advise

If you're using crontab, I would recommend using the regular curator command with a proper YAML configuration file, so that the command will be something more like

curator /path/to/action.yml

as opposed to what you're doing with the long curator-cli line.

As for how to use cron and crontab, I would suggest this howto document.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.