Not sure if this helps in your situation or not but I use the script below to monitor an Excel file for a matching date but to give me 10 days notice.
This script will need hacking to suit your needs, but the theory is there.
a = alarm.get()
message = "Certificate Expiry Alert"
SUPPKEY = "Certificate_Expiry"
SUBSYS = "1.1"
SOURCE = "192.168.1.1"
-- Settings
local allowed_age = 20160 -- In minutes
-- Input line (for testing only)
--local inputstr = "DOMAIN\\USERNAME,Web Server (WebServer),13/01/2017 09:13,13/01/2019,COMPANY_NAME,HOSTNAME_FQDN,SITE"
-- Separate line into 7 variables by token ","
local path, server, time, date, company_name, hostname, site = string.match(a.message, "([^,]+),([^,]+),([^,]+),([^,]+),([^,]+),([^,]+),([^,]+)")
-- Check, if the line is ok (not necessary, but should be here to handle possible errors)
-- Also note, some additional checks could be here (eg. regex to match DD/MM/YYYY format)
--if date == nil then
--nimbus.alarm (1, message , SUPPKEY , SUBSYS , SOURCE)
--print("Error reading line: "..a.message)
--end
-- Get current time minus 9000 minutes (in format DD/MM/YYYY)
local target_date = os.date("%d/%m/%Y", os.time() + allowed_age * 60)
-- Printing what we got (for testing)
print("Target date: "..target_date..", Input date: "..date)
-- Testing the match
if target_date == date then
nimbus.alarm (2, a.message , SUPPKEY , SUBSYS , SOURCE)
-- print("Dates are matched!")
else
print("Dates are not matched!")
end