天道酬勤,学无止境

cfadmin

如何在 ColdFusion 中获取计划任务列表和上次运行结果?(How to get list of scheduled tasks and last run results in ColdFusion?)

问题 我们正在尝试为我们的 cron 作业 ---- CF、Java、SQLServer 等构建一个仪表板,以便我们可以看到上次运行的时间、结果是什么,以及它们计划下一次运行的时间。 有没有办法使用 CFAdmin API 或一些未记录的<cfschedule>技巧来获取以下列表: 安排了哪些任务? 上次运行时间是多少? 成功了吗? 计划何时再次运行? 我们目前在 CF8 上,但将在几周内升级到 CF9。 回答1 我为你做了一点研究。 我发现了一个较旧的参考文献,它仍然有效,至少在 CF8 中并且大概在 CF9 中也是如此。 <cfobject type="JAVA" action="Create" name="factory" class="coldfusion.server.ServiceFactory"> <cfset allTasks = factory.CronService.listAll()/> <cfloop index="i" from="1" to="#ArrayLen(allTasks)#"> <cfdump var="#allTasks[i]#" /> </cfloop> 来自 http://www.bpurcell.org/blog/index.cfm?mode=entry&ENTRY=935 这回答了您的问题 #1 和 #4。 至于#3,没有答案。

2021-06-11 20:42:16    分类:技术分享    coldfusion   scheduled-tasks   coldfusion-8   coldfusion-9   cfadmin

How to get list of scheduled tasks and last run results in ColdFusion?

We're trying to build a dashboard for our cron jobs ---- CF, Java, SQLServer, etc. so that we can see when things were run last, what the result was, and when they're scheduled to run next. Is there a way with the CFAdmin API or some undocumented <cfschedule> trick to get a list of: What tasks are scheduled? What the last run time was? Did it succeed? When is it scheduled to run again? We're currently on CF8, but will be upgrading to CF9 within a few weeks.

2021-05-17 05:44:59    分类:问答    coldfusion   scheduled-tasks   coldfusion-8   coldfusion-9   cfadmin