你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

JobClient.ScheduleDeviceMethodAsync 方法

定义

重载

ScheduleDeviceMethodAsync(String, String, CloudToDeviceMethod, DateTime, Int64)

创建新的作业以在一个或多个设备上运行设备方法

ScheduleDeviceMethodAsync(String, String, CloudToDeviceMethod, DateTime, Int64, CancellationToken)

创建新的作业以在一个或多个设备上运行设备方法

ScheduleDeviceMethodAsync(String, String, CloudToDeviceMethod, DateTime, Int64)

创建新的作业以在一个或多个设备上运行设备方法

public virtual System.Threading.Tasks.Task<Microsoft.Azure.Devices.JobResponse> ScheduleDeviceMethodAsync (string jobId, string queryCondition, Microsoft.Azure.Devices.CloudToDeviceMethod cloudToDeviceMethod, DateTime startTimeUtc, long maxExecutionTimeInSeconds);
abstract member ScheduleDeviceMethodAsync : string * string * Microsoft.Azure.Devices.CloudToDeviceMethod * DateTime * int64 -> System.Threading.Tasks.Task<Microsoft.Azure.Devices.JobResponse>
override this.ScheduleDeviceMethodAsync : string * string * Microsoft.Azure.Devices.CloudToDeviceMethod * DateTime * int64 -> System.Threading.Tasks.Task<Microsoft.Azure.Devices.JobResponse>
Public Overridable Function ScheduleDeviceMethodAsync (jobId As String, queryCondition As String, cloudToDeviceMethod As CloudToDeviceMethod, startTimeUtc As DateTime, maxExecutionTimeInSeconds As Long) As Task(Of JobResponse)

参数

jobId
String

此作业的唯一作业 ID

queryCondition
String

用于评估要运行作业的设备的查询条件

cloudToDeviceMethod
CloudToDeviceMethod

方法调用参数

startTimeUtc
DateTime

启动作业的日期时间(Utc)

maxExecutionTimeInSeconds
Int64

最大执行时间(以秒为单位),即作业可以运行的 ttl 持续时间

返回

JobResponse 对象

适用于

ScheduleDeviceMethodAsync(String, String, CloudToDeviceMethod, DateTime, Int64, CancellationToken)

创建新的作业以在一个或多个设备上运行设备方法

public virtual System.Threading.Tasks.Task<Microsoft.Azure.Devices.JobResponse> ScheduleDeviceMethodAsync (string jobId, string queryCondition, Microsoft.Azure.Devices.CloudToDeviceMethod cloudToDeviceMethod, DateTime startTimeUtc, long maxExecutionTimeInSeconds, System.Threading.CancellationToken cancellationToken);
abstract member ScheduleDeviceMethodAsync : string * string * Microsoft.Azure.Devices.CloudToDeviceMethod * DateTime * int64 * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Devices.JobResponse>
override this.ScheduleDeviceMethodAsync : string * string * Microsoft.Azure.Devices.CloudToDeviceMethod * DateTime * int64 * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Devices.JobResponse>
Public Overridable Function ScheduleDeviceMethodAsync (jobId As String, queryCondition As String, cloudToDeviceMethod As CloudToDeviceMethod, startTimeUtc As DateTime, maxExecutionTimeInSeconds As Long, cancellationToken As CancellationToken) As Task(Of JobResponse)

参数

jobId
String

此作业的唯一作业 ID

queryCondition
String

用于评估要运行作业的设备的查询条件

cloudToDeviceMethod
CloudToDeviceMethod

方法调用参数

startTimeUtc
DateTime

启动作业的日期时间(Utc)

maxExecutionTimeInSeconds
Int64

最大执行时间(以秒为单位),即作业可以运行的 ttl 持续时间

cancellationToken
CancellationToken

任务取消令牌

返回

JobResponse 对象

适用于