预定任务状态归纳
创建一个函数,显示你的所有 ScheduledTasks 的状态.
In[1]:=
DisplayTasks[] := Module[{tasks},
tasks = ScheduledTasks[];
Grid[Take[
Reverse@SortBy[
Map[{Style[ScheduledTaskInformation[#, "Name"], 14,
FontFamily -> "Source Sans Pro"],
Style[ScheduledTaskInformation[#, "Status"], 14,
FontFamily -> "Source Sans Pro"],
NextScheduledTaskTime[#]} &, tasks], Last], 10],
Alignment -> {Left, Top}]
]
部署一个 AutoRefreshed 对象,每隔一小时自动显示并更新此信息.
In[2]:=
CloudDeploy[AutoRefreshed[DisplayTasks[], "Hourly"], "TaskDisplay"]