Share via


IBackgroundCopyJob4::SetMaximumDownloadTime method

Sets the maximum time that Delivery Optimization (DO) will spend transferring the files in the job.

Syntax

HRESULT SetMaximumDownloadTime(
  [in] ULONG Timeout
);

Parameters

  • Timeout [in]
    Maximum time, in seconds, that DO will spend transferring the files in the job. The default is 7,776,000 seconds (90 days).

Return value

The method returns the following return values.

Return code Description
S_OK

Success

 

Remarks

The value is the maximum elapsed time that the job can spend in the CONNECTING or TRANSFERRING state. Time spent in the QUEUED or TRANSIENT_ERROR state does not count against the timeout value. The job enters the fatal error state with an error code of BG_E_MAXDOWNLOAD_TIMEOUT if the transfer time exceeds the timeout value.

Note that if the computer sleeps while DO is transferring the job's data, the time spent sleeping will count against the timeout even though data is not being transferred.

Calling the IBackgroundCopyJob::Resume method, resets the elapsed time.

This method overrides the MaxDownloadTime group policy.

Requirements

Minimum supported client

Windows 10, version 1709 [desktop apps only]

Minimum supported server

Windows Server 2016 [desktop apps only]

Header

Deliveryoptimization.h

IDL

DeliveryOptimization.idl

Library

Dosvc.lib

DLL

Dosvc.dll

IID

IID_IBackgroundCopyJob4 is defined as 659cdeae-489e-11d9-a9cd-000d56965251

See also

IBackgroundCopyJob4

IBackgroundCopyJob4::GetMaximumDownloadTime