To explain the question: my server (NAS) sleeps when it is not used and I want to keep it this way. However, when someone uploads a photo folder, it wakes up and processes the upload.
I would like to notify a group of people when someone uploads a new folder, I would love to have a "cron", which triggers on a special event "someone uploads new folder" or a "cron" which runs only when the NAS is awake, because normally when I schedule the cron to be launched every 4 hours, the server sleeeps and then wakes up (every 4 hours) -- which I do not want.
The "upload process" (generating thumbnails) is a third-party application and I cannot modify this. What I need is to trigger the notify script at the right time (and not to wake a sleeping NAS).