The difference between task event trigger and task schedule trigger
Hi,
By what parameter or procedure can I identify between a task that runs at some time and a task that runs after another task?
Thank you!
Since tasks can have both there is no direct answer. One way to go is to get all task events by calling:
Invoke-QlikGet -path "/qrs/event/full"`
This will return all event triggers. Then you can filter out the data for the task in question (reloadTask.id) and get the event type (eventType). The event type have two possible options:
- Schema - runs on time intervals
- Composite - runs on events of other tasks
Another option will be to get that info in the same way as QMC:
- create selection for the task in question:
$selection = Invoke-QlikPost -path "/qrs/selection" -body '{"items":[{"type":"ReloadTask","objectID":"SOME-TASK-ID-HERE"}]}' - once the selection is created get its data:
Invoke-QlikGet -path "/qrs/selection/$($selection.id)/event/full" - if the selection is no longer needed then it can be deleted (this will not delete the task itself):
Invoke-QlikDelete -path "/qrs/selection/$($selection.id)"
This way the returned data will be only for the task, specified in the request body.
For both ways you'll have to determine the event type(s) by the eventType property. And just to mention again - you might have multiple events for a single task and they might be different type as well.
Thanks! Is there an equivalent function in ahayon's Qlik-Cli-Windows library that executes this command? Invoke-QlikGet -path "/qrs/event/full"`
Maybe one of those? Get-QlikTaskSchedule Get-QlikTask Get-QlikReloadTask
As far as i can see Get-QlikTaskSchedule is getting only the schedule events for the tasks (these are the hourly, daily, weekly etc events) and not the composite ones (dependant on another tasks).
Also i cant see a dedicated functions that are dealing with /qrs/event endpoints.
Thank you!