I created a program.conf that logrotate my logs hourly in an EC2 instance. the logrotate works well when i force it command (by sudo logrotate program.conf --verbose --force<
You will need to add the job in your crontab
crontab -e
And then add a job that runs every hour 14 minutes past,
14 * * * * /usr/sbin/logrotate /home/sammy/logrotate.conf --state /home/sammy/logrotate-state
Taken from : https://www.digitalocean.com/community/tutorials/how-to-manage-logfiles-with-logrotate-on-ubuntu-16-04
Also additionally check if the crontab is actually running by doing
service crontab status
if it is stopped you can start it by doing
service crontab start