def list_triggers(name, location='\\'):
 pythoncom.CoInitialize()
 task_service = win32com.client.Dispatch('Schedule.Service')
 task_service.Connect()
 task_folder = task_service.GetFolder(location)
 task_definition = task_folder.GetTask(name).Definition
 triggers = task_definition.Triggers
 ret = []
 for trigger in triggers:
  ret.append(trigger.Id)
 return ret

def list_triggers ( name , location = '\\' ) : pythoncom . CoInitialize ( ) task_service = win32com . client . Dispatch ( 'Schedule.Service' ) task_service . Connect ( ) task_folder = task_service . GetFolder ( location ) task_definition = task_folder . GetTask ( name ) . Definition triggers = task_definition . Triggers ret = [ ] for trigger in triggers : ret . append ( trigger . Id ) return ret
list all triggers that pertain to a task in the specified location .