vim /etc/cronab
59 23 * * * root (/usr/sbin/logrotate -f /path/to/nginx-log-rotate)
这样每天23时59分钟执行日志切割