{"title":"恢复","inframe":false,"hidden":false,"roles":{"dev":1},"pageLink":"","children":[{"configs":{"serverScript":"var rows = Wb.decode(request.getParameter('grid1')),\n  loadTask = com.wb.tool.TaskManager.loadTask,\n  trigger, triggers, result = [],\n  scheduler = com.wb.tool.TaskManager.scheduler,\n  defaultGroup = org.quartz.Scheduler.DEFAULT_GROUP;\n//批量更新默认启用事务\napp.run('update WB_TASK set STATUS=1 where TASK_ID={?TASK_ID?}', {\n  arrayName: 'grid1'\n});\nWb.each(rows, function(row) {\n  loadTask(row.TASK_ID, row.TASK_NAME, row.INTERVAL_TYPE, row.INTERVAL_EXPRESS,\n    row.CLASS_NAME, row.SERVER_SCRIPT, Wb.strToDate(row.BEGIN_DATE), Wb.strToDate(row.END_DATE));\n});\nWb.sleep(Var.getInt('sys.task.waitFireDelay'));\nWb.each(rows, function(row) {\n  triggers = scheduler.getTriggersOfJob(row.TASK_ID, defaultGroup);\n  trigger = triggers && triggers.length ? triggers[0] : null;\n  result.push({\n    STATUS: 1,\n    PREVIOUS: trigger ? trigger.getPreviousFireTime() : null,\n    NEXT: trigger ? trigger.getNextFireTime() : null\n  });\n});\napp.send(result);","itemId":"module"},"children":[],"type":"module","expanded":false}],"iconCls":""}