Hi List,
I have developed following working event procedure to create events based on
weekdays and time period. I thought someone on DL might have these kind of
requirement.
1. Code to create event 0xf3635311 if current hours is between 6:00 PM to
8:00 PM on weekday otherwise log event 0xf3635312
0xf3635310 E 20 P "If( And( GreaterOrEqual( FormatDateTime ( GetCurrentTime(),
{S \"%H\"} ), { U 18 } ), \
And( LessOrEqual( FormatDateTime ( GetCurrentTime(), {S
\"%H\"} ), { U 20 } ), \
Or( Equals ( FormatDateTime ( GetCurrentTime(), {S
\"%w+\"} ), {S \"Monday\"} ), \
Or( Equals ( FormatDateTime ( GetCurrentTime(), {S
\"%w+\"} ), {S \"Tuesday\"} ), \
Or( Equals ( FormatDateTime ( GetCurrentTime(), {S
\"%w+\"} ), {S \"Wednesday\"} ), \
Or( Equals ( FormatDateTime (
GetCurrentTime(), {S \"%w+\"} ), {S \"Thursday\"} ), \
Equals ( FormatDateTime ( GetCurrentTime(), {S
\"%w+\"} ), {S \"Friday\"} ) ) ) ) ) ) ), \
CreateEventWithVariables( \
{ C CURRENT_MODEL }, \
{ H 0xf3635311 }, \
GetEventVariableList() ), \
CreateEventWithVariables( \
{ C CURRENT_MODEL }, \
{ H 0xf3635312 }, \
GetEventVariableList() ) \
)"
2. Code to create event 0xf3635311 if current hours is between the value
of spectrum variable 2 to the value of spectrum variable 3 on weekdays
otherwise log event 0xf3635312
0xf3635310 E 20 P "If( And( GreaterOrEqual( FormatDateTime ( GetCurrentTime(),
{S \"%H\"} ), GetEventVariable( { U 2 } ) ), \
And( LessOrEqual( FormatDateTime ( GetCurrentTime(), {S
\"%H\"} ), GetEventVariable( { U 3 } ) ), \
Or( Equals ( FormatDateTime ( GetCurrentTime(), {S
\"%w+\"} ), {S \"Monday\"} ), \
Or( Equals ( FormatDateTime ( GetCurrentTime(), {S
\"%w+\"} ), {S \"Tuesday\"} ), \
Or( Equals ( FormatDateTime ( GetCurrentTime(), {S
\"%w+\"} ), {S \"Wednesday\"} ), \
Or( Equals ( FormatDateTime (
GetCurrentTime(), {S \"%w+\"} ), {S \"Thursday\"} ), \
Equals ( FormatDateTime ( GetCurrentTime(), {S
\"%w+\"} ), {S \"Friday\"} ) ) ) ) ) ) ), \
CreateEventWithVariables( \
{ C CURRENT_MODEL }, \
{ H 0xf3635311 }, \
GetEventVariableList() ), \
CreateEventWithVariables( \
{ C CURRENT_MODEL }, \
{ H 0xf3635312 }, \
GetEventVariableList() ) \
)"
n Lalit Tyagi
----------------------------------------
This message is intended exclusively for the individual(s) or entity to
which it is addressed. It may contain information that is proprietary,
privileged or confidential or otherwise legally exempt from disclosure.
If you are not the named addressee, you are not authorized to read,
print, retain, copy or disseminate this message or any part of it.
If you have received this message in error, please notify the sender
immediately by e-mail and delete all copies of the message.
---
To unsubscribe from spectrum, send email to [email protected] with the body:
unsubscribe spectrum [email protected]