{"title":"获取任务","inframe":false,"hidden":false,"roles":{"demo":1,"dev":1},"pageLink":"","children":[{"configs":{"serverScript":"var trigger, triggers, rs, meta, row, rows = [],\n  scheduler = com.wb.tool.TaskManager.scheduler,\n  Scheduler = org.quartz.Scheduler,\n  isShutdown = !scheduler || scheduler.isShutdown();\nrequest.setAttribute('searchCombo', '%' + Wb.opt(request.getParameter('searchCombo'), '') + '%');\nrs = app.run('select * from WB_TASK where TASK_NAME like {?searchCombo?} order by TASK_NAME');\nmeta = rs.getMetaData();\nwhile (rs.next()) {\n  row = Wb.getRecord(rs, meta);\n  if (!isShutdown) {\n    triggers = scheduler.getTriggersOfJob(rs.getString('TASK_ID'), Scheduler.DEFAULT_GROUP);\n    trigger = triggers && triggers.length ? triggers[0] : null;\n    if (trigger) {\n      Wb.apply(row, {\n        PREVIOUS: trigger.getPreviousFireTime(),\n        NEXT: trigger.getNextFireTime()\n      });\n    }\n  }\n  rows.push(row);\n}\napp.send(rows);","itemId":"module"},"children":[],"type":"module","expanded":true}],"iconCls":""}