How about this for 2:15pm and flag 'My Flag':
Code:function onRefreshConfig(forced) { controller.refreshUnits(); } function onSyncStart(forced) { var now = new Date(); if(now.getHours() == 14 && now.getMinutes() == 15) { var msg = 'My flag status: ' + controller.unitWithName('My Flag').flagDescription; helper.mail(controller, '[email protected]', 'flag status update', msg); } }
Or you can use unitWithNumber()
I tried this with the proper settings and I get an email saying:
My flag status: undefined
I want the value not the Description so I think I Have the wrong parameter in the above example. Any ideas?
Thanks!
Neil