How to programmatically schedule the publish/unpublish of AEM content fragments?
We are using AEM on-prem as a headless CMS, and our users want to be able to schedule the publish/unpublish of multiple content fragments (CFs) at once by uploading a CSV file containing the paths of the CFs, the action (publish/unpublish), and the activation datetimes. The functionality should work just like what we do using the "Manage publication" wizard, but should be able to affect more CFs at the same time. The CSV file may contain more than 100 lines.
We have implemented a ResourceChangeListener to process the CSV, but we are not sure how to schedule the publish/unpublish of the CFs programmatically. We tried to use Replicator, but it can only affect immediately and is not able to schedule.
We are looking for guidance on how to achieve this functionality using AEM's APIs or any other recommended approach. Any help or insights would be greatly appreciated. Thank you in advance!