Reduce data storage period

How can you limit the storage period of your data? Some data I need to store only for the last year. How to organize the deletion of data older than 1 year?

A similar question was asked recently. Here is the reply: Data retention - #4 by TrystanLea