Logrotate issues

I am having issues with logrotate and would like some help. I have exim installed on a system and I am trying to get the logs to rotate at 2359. I have a cron job setup to rotate the log but it appears that it will also run at random times. I do not have my config in /etc/logrotate.d/ directory.

59 23 * * * /usr/sbin/logrotate -f /etc/logrotate.exim/exim > /dev/null

Here is the exim rotate file :

/var/log/exim/main.log /var/log/exim/panic.log /var/log/exim/reject.log {
su exim exim
compress
compresscmd /usr/bin/gzip
uncompresscmd /usr/bin/gunzip
dateext
dateformat -%Y-%m-%d
rotate 30
missingok
}

Here you can see that they are rotating at random times :

-rw-r----- 1 exim exim 269 Jul 10 23:10 panic.log-2023-07-10.gz
-rw-r----- 1 exim exim 77696 Jul 10 23:56 reject.log-2023-07-10.gz
-rw-r----- 1 exim exim 115169 Jul 10 23:56 main.log-2023-07-10.gz

Any thoughts on why they rotate at random times? On other linux systems this works fine.

Check the last entries in the files, they were probably not changed between last entry and the log rotation time.

Yes, that does appear to be the case for most of them. I will keep an eye on it. Thanks.