I am slowly converting from HS2 to HS3 with generally fair success. However, I have one routine that is eluding me. I have a routine that sends out warnings the day before a full moon (we are in healthcare - people REALLY DO act weirder during a full moon!). Anyway, the routine is simple, but I can't get it to behave in HS3. The filetype is .vb and it is triggered at 06:00 daily. I added a couple of trace messages - the first correctly displays todays date (variable ds), the second displays the next full moon as "01/01/0001" and the current phase as 0. This routine worked under HS2 and seems to be consistent with the HS3 documentation. If anyone sees what I am missing, I would appreciate it.
------------------------------------------------------------
------------------------------------------------------------
Code:
Sub Main (parm as object) Dim ds as Date = Date.Now Dim NM as Date Dim FM as Date Dim CurCycle as Integer Dim sDesc as String = "" Dim msg as String hs.WriteLog("Moon", "Today is " & ds.ToShortDateString) hs.Moon(ds, NM, FM, CurCycle, sDesc) hs.WriteLog("Moon","Full moon on " & FM.ToShortDateString & _ ", Cycle is " & CurCycle.ToString) If CurCycle = 14 Then hs.WriteLog ("Info", "Moon is full tomorrow") msg = "Warning: tomorrow is a full moon - please take the necessary precautions" hs.SendEmail (xxx@yyy.com", "WebMaster@zzz.com", "Full Moon Pending", msg) End IF End Sub
Comment