service to monitor / poll file system for new assets
Hello,
I have a requirement to monitor / poll a path on filesystem of author instance for new asset files. When new file assets are SFTP'ed to that file system path / directory, my AEM service should add them to the DAM.
Question: how best to implement this in AEM? Should it be a servlet or service or another approach?
With a servlet, I believe it would need a post/get to initiate the process. This is not what I need. I need it to always be running (when instance is running) and monitor / poll the filesystem every minute or so to look for new files ( maybe a listener?).
With a service, I believe I would need to instantiate the service in a page to initiate the process. Again, this is not what I need. I need it to always be running and monitor / poll the filesystem every minute or so to look for new files ( maybe a listener?).
I very much appreciate some ideas / suggestions.
Thanks in advance.