Cluster.ExecuteCommandWithPaging Method
Executes a task on a specified group of nodes in the cluster. The output is returned in the requested page size.
Namespace: Microsoft.ComputeCluster
Assembly: CcpAPI (in ccpapi.dll)
Usage
Syntax
'Declaration
Public Function ExecuteCommandWithPaging ( _
id As Integer, _
task As ITask, _
userName As String, _
password As String, _
isConsole As Boolean, _
hwndParent As Integer, _
pageSize As Integer _
) As IClusterEnumerable
public IClusterEnumerable ExecuteCommandWithPaging (
int id,
ITask task,
string userName,
string password,
bool isConsole,
int hwndParent,
int pageSize
)
public:
virtual IClusterEnumerable^ ExecuteCommandWithPaging (
int id,
ITask^ task,
String^ userName,
String^ password,
bool isConsole,
int hwndParent,
int pageSize
) sealed
public final IClusterEnumerable ExecuteCommandWithPaging (
int id,
ITask task,
String userName,
String password,
boolean isConsole,
int hwndParent,
int pageSize
)
public final function ExecuteCommandWithPaging (
id : int,
task : ITask,
userName : String,
password : String,
isConsole : boolean,
hwndParent : int,
pageSize : int
) : IClusterEnumerable
Parameters
- id
The command identifier. To get this value, call the Cluster.GetNewCommandId method.
- task
A class that implements the ITask interface. The task identifies the task to execute. To create the task, call the Cluster.CreateTask method.
userName
The name of the RunAs user, in the form domain\username. The user name is limited to 80 Unicode characters.If userName is NULL, empty, or not valid, the cluster searches the calling user's credential cache for the credentials to use. If the cache contains only one credential, it is used. If the cache does not exist or contains multiple credentials, the user is prompted for the credentials.
- password
The RunAs user's password. The password is limited to 127 Unicode characters. If this parameter is NULL or empty, the method uses the cached credentials (see Cluster.SetCachedCredentials). If the credentials are not cached, the current user is prompted for the credentials. If the isConsole parameter is true, the user is prompted in the console window; otherwise, the standard credentials dialog box is used.
- isConsole
Set the value to true if the application is a console-mode application. Set the value to false if the application is a GUI application.
- hwndParent
The handle to use as the parent window for the modal credentials dialog box. If 0, HWND_DESKTOP is used. The handle is ignored if the isConsole parameter is true.
- pageSize
The number of Unicode characters to return in each page of the output. The minimum size is 2,048 Unicode characters and the maximum size is 20,480. If the value is outside this range, the method determines the page size.
Return Value
An IClusterEnumerable interface. The collection contains an IExecutionResult interface for each instance of the task (one result for each node on which the task ran).
Remarks
This method can be called only by a cluster administrator.
An instance of the task runs on the nodes specified in the Task.RequiredNodes property. If no nodes are specified, the command runs on each node in the cluster. The task does not wait in the queue to be scheduled. Standard output and standard error are captured in the result. To get the output in the specified page size, call the Cluster.ReadExecutionResult method in a loop until the output string is empty.
If the Cluster.IsAsynchronous property is false, this method waits until all nodes return results. If IsAsynchronous is true, this method returns after the first node returns a result. To retrieve results from the other nodes, call the Cluster.WaitForCommandWithPaging method in a loop until all results are retrieved (the enumeration is empty).
To cancel all instances, call the Cluster.EndCommand method.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Platforms
Development Platforms
Microsoft Windows Compute Cluster Server 2003, Windows Server 2003, Windows XP
Target Platforms
Microsoft Windows Compute Cluster Server 2003, Windows Server 2003 with Compute Cluster Pack Client Utilities, Windows XP with Compute Cluster Pack Client Utilities
See Also
Reference
Cluster Class
Cluster Members
Microsoft.ComputeCluster Namespace
Cluster.EndCommand Method
Cluster.ExecuteCommand Method
GetNewCommandId