()
| 50 | print(f"Error executing task {task_id}: {e}") |
| 51 | |
| 52 | def execute_startup_services(): |
| 53 | get = public.dict_obj() |
| 54 | p = crontab.crontab() |
| 55 | crontab_data = get_crontab_data() # 获取crontab数据 |
| 56 | for task in crontab_data: |
| 57 | if task['sType'] == 'startup_services': # 检查任务类型 |
| 58 | get.id=task['id'] |
| 59 | # 直接调用StartTask函数执行任务 |
| 60 | p.StartTask(get) |
| 61 | |
| 62 | # 执行示例 |
| 63 | execute_startup_services() |
no test coverage detected