#111839 - 2004-01-17 06:57 PM
Re: Logoff all users
|
Co
MM club member
 
Registered: 2000-11-20
Posts: 1342
Loc: NL
|
Yep, you are right.. Funny is better..
When I schedule a task on a remote pc it has nothing to do with the pc I schedule it from isn't it?
When I schedule for example a task on multiple pc's at 17:00 in different timezones this task will start on every pc's at 17:00 in its own timezone... This has to be the same for idletime...
Why aren't you so sure about scheduling a task on a remote pc with for example TaskScheduleControl()?
I'd like to hear your results after testing it..
again your own UDF library which I like -TaskScheduleControl()
I quoted some parts of this UDF..
Quote:
........; Used by tsDefineTask and tsActivateEvent functions - TASK parameter names
$tsTASKPARMS = "ApplicationName", "Parameters", "WorkingDirectory", "Comment", "Creator", "Priority", "MaxRunTime", "Idle", "DontStartIfOnBatteries", "KillIfGoingOnBatteries", "RunOnlyIfLoggedOn", "SystemRequired", "DeleteWhenDone", "Suspend", "StartOnlyIfIdle", "KillOnIdleEnd", "RestartOnIdleResume", "Hidden", "Interactive", "HaltOnError"....
;
;
;
......;======================================================================
;
;FUNCTION tsDefineTask(TaskAry, TaskParms)
;
;ACTION Loads the specified array with the task parameter pairs.
; The parameter pairs consist of a 3-character mnemonic, "=",
; and a value. Mnemonics represent the 20 JT parameter names,
; and are identified in the table below.
;
;SYNTAX tsDefineTask("TaskAry", TaskParm=val,...)
;
;PARAMETERS UsrAry - Name of task array to populate (as string, w/o "$")
; TaskParm - List of mnemonic=Value Parameter pairs, comma-delimited
;
; Mnemonic Parameter Name Data Type
; APP : ApplicationName String - command to run
; PRM : Parameters String - app parameters
; WKD : WorkingDirectory String
; CMT : Comment String
; CTR : Creator String
; PRI : Priority STring: IDLE, NORMAL, HIGH, REALTIME
; MRT : MaxRunTime Integer (ms)
; IDL : Idle Integer # # (wait & deadline min)
; DSB : DontStartIfOnBatteries Boolean
; KGB : KillIfGoingOnBatteries Boolean
; RLO : RunOnlyIfLoggedOn Boolean
; SRQ : SystemRequired Boolean
; DWD : DeleteWhenDone Boolean
; SUS : Suspend Boolean
; SII : StartOnlyIfIdle Boolean
; KIE : KillOnIdleEnd Boolean
; RIR : RestartOnIdleResume Boolean
; HID : Hidden Boolean
; ITV : Interactive Boolean (currently unsupported by JT)
; HOE : HaltOnError Boolean (currently unsupported by JT)
;
;REMARKS This function parses the parameter=value pairs and loads the
; value into the correct array position. Parameter pairs are separated
; by whitespace. Any character is permitted in the value portion, but
; equal signs (=) must be escaped as "==".
;
;RETURNS nothing - sets @ERROR
;
;DEPENDENCIES none
;
;EXAMPLE tsDefineTask("MyTaskArray", 'APP=kix32.exe PRM=$arg==3 WKD=C:\TEMP')
; "MyTaskArray" is the name of the array that will be loaded.......
;
;
;
;
;
..... ; Certain Trigger types do not require the TypeArguments value to be set. The
; "RQ" flag in element 9 is removed automatically for those...
If InStr("ONCE,ONIDLE,ATSTARTUP,ATLOGON", $tsTrigAry[$tsTrigId,8]) <> 0
$tsTrigAry[$tsTrigId,9] = "" ; remove ReQuired flag for these Types
EndIf..........
Btw: Basta = enough! - En daarmee basta! = And there is an end!
Edited by Co (2004-01-17 09:32 PM)
_________________________
Co
|
|
Top
|
|
|
|
#111840 - 2004-01-20 12:14 AM
Re: Logoff all users
|
olmeca3332003
Fresh Scripter
Registered: 2003-10-26
Posts: 35
|
Interesting discussion, I must say that I got more than expected. I ‘will take the time to go over all that was said, however, I am leaning towards Co’s suggestion about the use of Jt.exe. Fellows, Lankero mentioned an admin script, as a newbie to scripting; those anyone care to elaborate on the creation or startup codes?
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 657 anonymous users online.
|
|
|