There is a Linux utility called incron, which can be used similarly to normal cron, but instead of being time-based, they are disconnected from inotify and dismissed from file events.
Information on the Ubuntu page can be found here: http://manpages.ubuntu.com/manpages/intrepid/man5/incrontab.5.html
I personally did not have to use it for something too complicated, but it is something like this:
Install it:
sudo apt-get install incron
Open the editor to add an entry:
incrontab -e
Put something like this:
/var/www/myfolder IN_MODIFY curl https://www.example.com/api/file-updated/$#
The first part is a file or folder to view. The second part is an event. And the third part is the team.
I think $# is a placeholder for this file.
source share