auths
objectHow many seconds in the future would you like to schedule the task?
Enter the URL as it appears in the Endpoint field of your Task Scheduler source
The message / payload to send to your task scheduler. Can be any string or JavaScript object. This message will be emitted by the task scheduler at the specified number of seconds in the future.
return
or this.key = 'value'
, pass input data to your code viaparams
, and maintain state across executions with$checkpoint.async
(event, steps, params) => {
}
// N seconds from now
this.ts = (new Date(+new Date() + (params.numSeconds * 1000))).toISOString()
const headers = {
"Content-Type": "application/json"
}
if (params.secret) {
headers["x-pd-secret"] = params.secret
}
return await require("@pipedreamhq/platform").axios(this, {
url: `${params.taskSchedulerURL}/schedule`,
headers,
data: {
timestamp: this.ts,
message: params.message,
}
})