import win32com.client scheduler = win32com.client.Dispatch('Schedule.Service') scheduler.Connect() folders = scheduler.GetFolder('\\') tasks = folders.GetTasks(1) TASK_STATE = {0: 'Unknown', 1: 'Disabled', 2: 'Queued', 3: 'Ready', 4: 'Running'} for task in list(tasks): print('=========================') settings = task.Definition.Settings print('Path : %s' % task.Path) print('Hidden : %s' % settings.Hidden) print('State : %s' % TASK_STATE[task.State]) print('Last Run : %s' % task.LastRunTime) print('Last Result: %s' % task.LastTaskResult)
标签:task,TASK,print,任务,tasks,scheduler,清单,Hidden,列出 From: https://www.cnblogs.com/pythonClub/p/16954754.html