When I run the curator command in crontab, cron logs show ing job was completed but in curator logs showing old logs, not the time when cronjob ran.
Crontab is working for remain all commands.
Same command is working fine when ran normally.
-bash-4.2$ sudo crontab -l
41 06 * * * sudo /opt/elasticsearch-curator/curator --config /opt/curator/curator-config.yml /opt/curator/curator-action.yml --dry-run
40 06 * * * sudo /usr/bin/curator --config /opt/curator/curator-config.yml /opt/curator/curator-action.yml --dry-run
-bash-4.2$ sudo whereis curator
curator: /usr/bin/curator
-bash-4.2$ sudo tail /var/log/cron
Apr 8 06:38:55 uslv-sapp-elk01 crontab[28499]: (root) REPLACE (root)
Apr 8 06:38:55 uslv-sapp-elk01 crontab[28499]: (root) END EDIT (root)
Apr 8 06:39:01 uslv-sapp-elk01 crond[1375]: (root) RELOAD (/var/spool/cron/root)
Apr 8 06:40:01 uslv-sapp-elk01 CROND[28651]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Apr 8 06:40:01 uslv-sapp-elk01 CROND[28652]: (root) CMD (sudo /usr/bin/curator --config /opt/curator/curator-config.yml /opt/curator/curator-action.yml --dry-run)
Apr 8 06:41:01 uslv-sapp-elk01 CROND[28724]: (root) CMD (sudo /opt/elasticsearch-curator/curator --config /opt/curator/curator-config.yml /opt/curator/curator-action.yml --dry-run)
-bash-4.2$ sudo tail -n 3 /var/log/curator/curator.log
2019-04-08 06:17:41,293 INFO (CLOSED) indices may be shown that may not be acted on by action "delete_indices".
2019-04-08 06:17:41,293 INFO Action ID: 3, "delete_indices" completed.
2019-04-08 06:17:41,293 INFO Job completed.
-bash-4.2$
OS: RedHat LInux 7.5
-bash-4.2$ sudo java -version
openjdk version "1.8.0_181"
OpenJDK Runtime Environment (build 1.8.0_181-b13)
OpenJDK 64-Bit Server VM (build 25.181-b13, mixed mode)
elasticsearch-6.6.0-1.noarch
elasticsearch-curator-5.6.0-1.x86_64
OS: RedHat LInux 7.5
-bash-4.2$ sudo java -version
openjdk version "1.8.0_181"
OpenJDK Runtime Environment (build 1.8.0_181-b13)
OpenJDK 64-Bit Server VM (build 25.181-b13, mixed mode)
elasticsearch-6.6.0-1.noarch
elasticsearch-curator-5.6.0-1.x86_64