class_docstr: Trigger Task execution if an event happens in the system.
  
  Examples:
  
  - New model is published/tagged,
  - New Dataset is created,
  - General Task failed,
  - Task metric below/above threshold, alert every X minutes
class_docstr_tok: ["Trigger","Task","execution","if","an","event","happens","in","the","system",".","Examples",":","-","New","model","is","published\/tagged",",","-","New","Dataset","is","created",",","-","General","Task","failed",",","-","Task","metric","below\/above","threshold",",","alert","every","X","minutes"]
docstr: Create a Task trigger service
  
  :param pooling_frequency_minutes: Check for new events every X minutes (default 3)
  :param sync_frequency_minutes: Sync task scheduler configuration every X minutes.
      Allow to change scheduler in runtime by editing the Task configuration object
  :param force_create_task_name: Optional, force creation of Task Scheduler service,
      even if main Task.init already exists.
  :param force_create_task_project: Optional, force creation of Task Scheduler service,
      even if main Task.init already exists.
docstr_tok: ["Create","a","Task","trigger","service",":","param","pooling_frequency_minutes",":","Check","for","new","events","every","X","minutes","(","default","3",")",":","param","sync_frequency_minutes",":","Sync","task","scheduler","configuration","every","X","minutes",".","Allow","to","change","scheduler","in","runtime","by","editing","the","Task","configuration","object",":","param","force_create_task_name",":","Optional",",","force","creation","of","Task","Scheduler","service",",","even","if","main","Task.init","already","exists",".",":","param","force_create_task_project",":","Optional",",","force","creation","of","Task","Scheduler","service",",","even","if","main","Task.init","already","exists","."]
code: def __init__(
      self,
      pooling_frequency_minutes=3.0,
      sync_frequency_minutes=15,
      force_create_task_name=None,
      force_create_task_project=None,
  ):
      # type: (float, float, Optional[str], Optional[str]) -> None
      """
      Create a Task trigger service
  
      :param pooling_frequency_minutes: Check for new events every X minutes (default 3)
      :param sync_frequency_minutes: Sync task scheduler configuration every X minutes.
          Allow to change scheduler in runtime by editing the Task configuration object
      :param force_create_task_name: Optional, force creation of Task Scheduler service,
          even if main Task.init already exists.
      :param force_create_task_project: Optional, force creation of Task Scheduler service,
          even if main Task.init already exists.
      """
      super(TriggerScheduler, self).__init__(
          sync_frequency_minutes=sync_frequency_minutes,
          force_create_task_name=force_create_task_name,
          force_create_task_project=force_create_task_project,
          pooling_frequency_minutes=pooling_frequency_minutes,
      )
      self._task_triggers = []
      self._dataset_triggers = []
      self._model_triggers = []
      self._executed_triggers = []
      self._client = None
  
imports: import json
  import logging
  from datetime import datetime
  from threading import enumerate
  from typing import List, Optional, Dict, Union, Callable
  from attr import attrs, attrib
  from .job import ClearmlJob
  from .scheduler import BaseScheduleJob, BaseScheduler, ExecutedJob
  from ..task import Task
  from ..backend_api.session.client import APIClient
  from ..backend_interface.util import datetime_to_isoformat, datetime_from_isoformat
label_desc: Use image node_id 1 to create a new TriggerScheduler object from inherited base classes: BaseScheduler with example: obj = TriggerScheduler(pooling_frequency_minutes, sync_frequency_minutes, force_create_task_name, force_create_task_project)