Use a login script with the following example code. You'll need to adjust the tests as appropriate for your needs.

The basic idea is to set $Allow to true, then find ways to set it to false, such as workstation name, user name, group membership, or time of day.

Then, maybe, find a couple of ways to bend the rules, like Fri-Sun is fair game.

You can create more complex tests by creating values for each test, like $Day_OK, $Time_OK, $User_OK, and $Wksta_OK. Then set the $Allow value based on tests with these values in AND / OR combinations.

The TimeDiff() UDF can be used creatively to check a range of time, as illustrated here. TimeDiff is not sensitive to local time or display format.

 Code:
Break Off		; exit if BREAK is pressed

$Allow = 1		; allow by default

; Change allow status based on time of day - never allow between 13:00-15:00
; TimeDiff returns the number of minutes between the current time and 15:00 of the current day
; This value will be between 120 (at 13:00) and 0 (at 15:00) during tht time range not allowed.
; Before 13:00, it will be greater than 120, and after 15:00 it will be negative, thus the following test
; You need to download and include the TimeDiff() UDF in your script
$TVal = TimeDiff('now', @DATE + ' 15:00:00', 'M') 
If $TVal < 120 And $TVal > 0
  $Allow = 0
EndIf

; Change allow status base on workstation
$Allow = IIf(Left(@WKSTA, 3) = 'LPC', 0, $Allow)

; Change allow status base on group
$Allow = IIf(InGroup('Elever', 0, $Allow)

; continue with other allow tests as appropriate, setting $Allow to 0 if not permitted



; Process exceptions to the rules

; Override the allow value if the day is not in the range
; All users are allowed at any time on Fri-Sun
If Not InStr('MONTUEWEDTHU', Left(@DAY, 3)
  $Allow = 1
EndIF





; If $Allow is zero at this point, the user should not be permitted,
; so perform a logoff
If Not $Allow
  Logoff(1)                ; exit the script - brea
EndIf


The TimeDiff UDF is here.

Glenn

_________________________
Actually I am a Rocket Scientist! \:D