I have a cron task configured in cron.d directory that would get executed for every 5 minutes. The entry is
*/5 * * * * root /usr/sbin/logrotate /etc/logrotate.d/test_consolelog
This would invoke the logrotate. However the logrotate didn't happen. I checked the /var/log/cron file to see if cron executes the command and could see that the command is getting executed for every 5 minutes.
I tried executing the command mannually on the terminal and could see that the command is executed and log rotation happens.
What could be reason that logrotate is not happening when getting executed from cron.d.
Regars, Bala