I would like to use the IfTime or RealTime function to trigger a EmailRelay command at a given time of day or week. For example, an emailed system performance update sent weekly on Monday mornings at 1am.
Using CRBasic, I recieve an error "Undeclared variable RealTime" or "Undeclared variable IfTime" when using either function. Is there a problem using these functions with the CR3000? Other functions such as TimeIntoInterval work OK.
Below is an example for an email trigger to be set to true Monday at 01:00.
If RealTime (8) = 1 and RealTime(4) = 1 Then
EmailTrigger = True
EndIf
Thank you,
Ryan
IfTime() functions equivalent to TimeIntoInterval(). TimeIntoInterval is a longer word to type, but preferred because it avoids some confusion of the double if. "If TimeIntoInterval(..." and "If Iftime(..." are equivalent.
With RealTime() you need to declare a variable array to put the values into, and use the instruction RealTime() before your if statement to populate the variables. TimeIntoInterval() is often simpler to use.