id: Wait Until Datetime version: -1 fromversion: 5.0.0 name: Wait Until Datetime description: Pauses execution until the date and time that was specified in the plabyook input is reached. starttaskid: '0' tasks: '0': id: '0' taskid: 5fbf5212-c63a-4baa-8a87-2d92e2943aa0 type: start task: id: 5fbf5212-c63a-4baa-8a87-2d92e2943aa0 version: -1 name: '' iscommand: false brand: '' description: '' nexttasks: '#none#': - '1' separatecontext: false view: |- { "position": { "x": 450, "y": 50 } } note: false timertriggers: [] ignoreworker: false '1': id: '1' taskid: d21be7af-0944-4dad-8329-76a247d3bcae type: condition task: id: d21be7af-0944-4dad-8329-76a247d3bcae version: -1 name: Were a future date and time configured? description: Checks whether the DateTimeToWaitUntil input was configured. type: condition iscommand: false brand: '' nexttasks: '#default#': - '2' 'yes': - '11' separatecontext: false conditions: - label: 'yes' condition: - - operator: isNotEmpty left: value: complex: root: inputs.DatetimeToWaitUntil iscontext: true view: |- { "position": { "x": 450, "y": 180 } } note: false timertriggers: [] ignoreworker: false '2': id: '2' taskid: cdcaeadb-f4d9-4faa-8b5a-3bf0ed91ff6d type: title task: id: cdcaeadb-f4d9-4faa-8b5a-3bf0ed91ff6d version: -1 name: No Future Datetime type: title iscommand: false brand: '' description: '' nexttasks: '#none#': - '8' separatecontext: false view: |- { "position": { "x": 970, "y": 960 } } note: false timertriggers: [] ignoreworker: false '3': id: '3' taskid: dfa02b41-5472-4879-8259-fec9aeacbe53 type: condition task: id: dfa02b41-5472-4879-8259-fec9aeacbe53 version: -1 name: For when is the datetime specified? description: Determines if the datetime to wait until is now, in the future or in the past. type: condition iscommand: false brand: '' nexttasks: '#default#': - '2' Future: - '6' separatecontext: false conditions: - label: Future condition: - - operator: isAfter left: value: complex: root: inputs.DatetimeToWaitUntil iscontext: true right: value: complex: root: DatetimeToWaitFrom iscontext: true view: |- { "position": { "x": 450, "y": 710 } } note: false timertriggers: [] ignoreworker: false '6': id: '6' taskid: bb5fa066-c4a9-40ab-8281-7b552f83ff4a type: regular task: id: bb5fa066-c4a9-40ab-8281-7b552f83ff4a version: -1 name: Calculate time to wait description: Calculates the amount of time, in minutes, to wait until the datetime is reached. scriptName: CalculateTimeDifference type: regular iscommand: false brand: '' nexttasks: '#none#': - '7' scriptarguments: end_time: complex: root: inputs.DatetimeToWaitUntil transformers: - operator: Stringify - operator: replace args: limit: {} replaceWith: {} toReplace: value: simple: Z start_time: complex: root: DatetimeToWaitFrom transformers: - operator: Stringify - operator: replace args: limit: {} replaceWith: {} toReplace: value: simple: Z separatecontext: false view: |- { "position": { "x": 450, "y": 945 } } note: false timertriggers: [] ignoreworker: false '7': id: '7' taskid: 4cb07489-19f4-4756-8c0b-e9fac2d97124 type: regular task: id: 4cb07489-19f4-4756-8c0b-e9fac2d97124 version: -1 name: Wait the time needed description: Pauses the execution for the necessary amount of time. scriptName: Sleep type: regular iscommand: false brand: '' nexttasks: '#none#': - '8' scriptarguments: seconds: complex: root: Time accessor: Difference transformers: - operator: multiply args: by: value: simple: '60' - operator: round - operator: Stringify reputationcalc: 1 separatecontext: false view: |- { "position": { "x": 450, "y": 1110 } } note: false timertriggers: [] ignoreworker: true '8': id: '8' taskid: 72b956fc-c67d-49a2-8b74-faac5b59574c type: title task: id: 72b956fc-c67d-49a2-8b74-faac5b59574c version: -1 name: Continue type: title iscommand: false brand: '' description: '' separatecontext: false view: |- { "position": { "x": 450, "y": 1290 } } note: false timertriggers: [] ignoreworker: false '11': id: '11' taskid: 2a4b6cf6-c4fc-44dd-818f-b2f7d53ac3a1 type: regular task: id: 2a4b6cf6-c4fc-44dd-818f-b2f7d53ac3a1 version: -1 name: Get current time description: Retrieves the current date and time. scriptName: GetTime type: regular iscommand: false brand: '' nexttasks: '#none#': - '12' scriptarguments: contextKey: {} date: {} dateFormat: simple: ISO hoursAgo: {} minutesAgo: {} monthsAgo: {} reputationcalc: 1 separatecontext: false view: |- { "position": { "x": 450, "y": 360 } } note: false timertriggers: [] ignoreworker: false '12': id: '12' taskid: 250a61da-b6ee-4489-89b7-8a4e76495f05 type: regular task: id: 250a61da-b6ee-4489-89b7-8a4e76495f05 version: -1 name: Set the from-time to the current time description: Saves the current time as the time to start waiting from. scriptName: Set type: regular iscommand: false brand: '' nexttasks: '#none#': - '3' scriptarguments: append: {} key: simple: DatetimeToWaitFrom stringify: {} value: complex: root: TimeNow separatecontext: false view: |- { "position": { "x": 450, "y": 530 } } note: false timertriggers: [] ignoreworker: false view: |- { "linkLabelsPosition": { "1_11_yes": 0.48, "1_2_#default#": 0.27, "3_2_#default#": 0.52, "3_6_Future": 0.58 }, "paper": { "dimensions": { "height": 1305, "width": 900, "x": 450, "y": 50 } } } inputs: - key: DatetimeToWaitUntil value: {} required: true description: 'The date and time to wait until before finishing the playbook. Should be in ISO-8601 format. For example: 2019-11-13T15:33:10.314406457Z' outputs: [] tests: - Wait Until Datetime - Test