Share via


IFsrmFileManagementJob.WaitForCompletion Method (Int32)

 

Waits for the specified period of time or until the job has finished running.

Namespace:   Microsoft.Storage
Assembly:  srmlib (in srmlib.dll)

Syntax

bool WaitForCompletion(
    int waitSeconds
)
bool WaitForCompletion(
    int waitSeconds
)
abstract WaitForCompletion : 
        waitSeconds:int -> bool
Function WaitForCompletion (
    waitSeconds As Integer
) As Boolean

Parameters

  • waitSeconds
    Type: System.Int32

    The number of seconds to wait for the job to complete. The method returns when the period expires or the job complete. To wait indefinitely, set the value to –1.

Return Value

Type: System.Boolean

True if the job completed; otherwise, false.

Remarks

 Runmethod. Jobs run asynchronously, calling this method blocks your thread until the job completes or the timeout period expires.

After WaitForCompletion returns, access the LastError property to determine if the reports completed successfully.

See Also

IFsrmFileManagementJob Interface
Microsoft.Storage Namespace

Return to top