Hi Mateusz,
yes, we don't have the ability to create cron jobs yet, however, if you'd like to create the process instance with a periodicity of 24 hours, I think you can try by doing something like this:
{
"id": "MY_CRON_JOB",
"correlationId": "MY_CRON_JOB",
"state": null,
"schedule": {
"type": "timer",
"startTime": "2023-08-10T23:59:59.000+02:00",
"repeatCount": 99999,
"delay": 24,
"delayUnit": "HOURS"
},
"retry": null,
"recipient": {
"type": "http",
"method": "POST",
"headers": {
"Content-Type" : "application/json"
},
"queryParams": {},
"payload": {
"type": "json",
"data": {
"workflowdata" : {
"param1": "constantValue1",
"param2": "constantValue2"
}
}
}
}
}
3) explanations about the request
id: is a convenient string that you can use later to cancel the job when you don't need it anymore
correlationId: use the same value as id
repeatCount: indicates the number of times the job execution must be repeated, set a value >= 0 and < MAX_INTEGER
recipient: basically defines the endpoint that must be invoked. In the example I'm using the endpoint of an example servlerless workflow
http://localhost:8380/hello_world. The other contents, like type: "http" and headers you must keep as they are.
payload:
in the example above, I'm simulating the execution of a servlerless workflow, that expects a the following json
"workflowdata" : {
"param1": "constantValue1",
"param2": "constantValue2"
}
(the other vales are part of the content definition)
if you don't need to pass any parameters to you process you can set:
"payload":null
or
"payload": {
"type": "json",
"data": { }
}
}
I hope this helps,
Regards,
Walter.