Originally Posted by azheruddin
wanted to do it through Script and wanted to add this job in cron.
Are you saying you don't want to use logrotate? You can invoke it from a script and run the job in cron.
As Vikas027 is saying, perhaps a bit more elaboration on what exactly you're trying to do and what you have tried thus far will get you some more helpful answers. I know that myself and many others on the forum know a ton about logrotate.