In new replication engine snapshot names and creation times are aligned with schedule, so we can do this using that periodic snapshot task schedule. E.g., periodic snapshot task that is scheduled to run every day at 20:00, snapshot auto-2020-03-28-20-00 will be mapped to this task, but auto-2020-03-28-21-00 will not.
If snapshot is mapped to multiple periodic snapshot tasks, the biggest retention time is used (e.g. if one task keeps snapshots for month, but there is another one that keeps them for year, it will only be deleted in a year).