{"hidden":false,"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', '%' + (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"},"expanded":true,"children":[],"type":"module"}],"roles":{"demo":1},"title":"获取任务","iconCls":"","inframe":false,"pageLink":""}