How can i log rotation my log file with cron job

I have logs file like edge-message-processor.log
and I want as soon as this file size is reach at 10MB then it will rotate my log to new directory
how can i do this

@rohan099 , I think you are querying about logrotate in Linux. You can use logrotate for this task.

@tgp could you please tell me in brief how can i do this let say i have a log at location /opt/var/logs/edge.log i want these log to be rotate

@rohan099 , check this. You will get an idea.