DeviceJob Data Type

Properties
name data type constraints description
status DeviceJobStatus  
cronRetryExpression string  
endOn number  
cronNextRetryOn number  
retryEvery number required
resumed boolean required
requestTimeout number  
processOnConnect boolean  
sendWakeupSMS boolean  
wakeupTimeout number  
deviceInactivityTimeout number  
Properties inherited from Job
id number required
accountId number required
jobType JobType  
displayName string  
jobProperties string  
createdOn number  
createdBy number required
startOn number  
retryMaxAttempts number required
retryCount number required
optlock number required The optlock field is used to detect that this entity has not been modified by someone else. When updating an entity, first do a find to get the latest version of the entity and note the value of the optlock. Then in the update operation, set the optlock value to match the value that you found. If someone else has updated the entity between your find and update operations, the update will fail and the db/server will return an error.

See this stackoverflow question for more information on optimistic locking.

Example

{
  "status" : "FAILED",
  "cronRetryExpression" : "...",
  "endOn" : 12345,
  "cronNextRetryOn" : 12345,
  "retryEvery" : 12345,
  "resumed" : true,
  "requestTimeout" : 12345,
  "processOnConnect" : true,
  "sendWakeupSMS" : true,
  "wakeupTimeout" : 12345,
  "deviceInactivityTimeout" : 12345,
  "id" : 12345,
  "accountId" : 12345,
  "jobType" : "device_certificate_update",
  "displayName" : "...",
  "jobProperties" : "...",
  "createdOn" : 12345,
  "createdBy" : 12345,
  "startOn" : 12345,
  "retryMaxAttempts" : 12345,
  "retryCount" : 12345,
  "optlock" : 12345
}