I have a group with a very odd request. They need to monitor a specific file and ensure that it is updated every 24 hours, at least. This is trivial to do with dirscan, however they need the 24 hour time period to always start at the same time. For example, right now the file could be updated at 5:30am one day and then 24 hours later it may alarm. However when it is finally updated the counter will use the new time (for example, 6:30am).
The only thought I had on solving this was to schedule a LUA script - I'm not sure how to configure the NimBUS calls for dirscan in order to get the current age of the file in minutes.
If you want to script this with Lua, you do not need the dirscan probe at all. The controller has a callback named file_stat that returns information about a file you would typically see when viewing a directory listing. This includes the modified time. From that it would be easy to calculate the age.
Using the controller is the way we will move forward. Thanks!