Qlik-Cli-Windows icon indicating copy to clipboard operation
Qlik-Cli-Windows copied to clipboard

The difference between task event trigger and task schedule trigger

Open itsik85 opened this issue 1 year ago • 1 comments

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!

itsik85 avatar Jul 08 '24 07:07 itsik85

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

image

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.

countnazgul avatar Jul 08 '24 08:07 countnazgul

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

itsik85 avatar Jul 10 '24 12:07 itsik85

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.

countnazgul avatar Jul 11 '24 04:07 countnazgul

Thank you!

itsik85 avatar Jul 11 '24 06:07 itsik85