• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Tool Available to Display Scheduled Task Results

Explorer ,
Mar 03, 2020 Mar 03, 2020

Copy link to clipboard

Copied

I am looking for an existing tool, resource, program, etc. to display the results of nightly tasks.  I want to make this available for employees outside of the IT sphere, to make it easy to see that tasks have or haven't run. An ability to retain and display historical ST data would also be beneficial.

Thanks.

TOPICS
Monitoring , Reporting

Views

536

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 03, 2020 Mar 03, 2020

Copy link to clipboard

Copied

The short answer is "no, there is no such tracking" available by default for CF scheduled tasks.  (And I assume that by asking here about such "nightly tasks", you are indeed asking about CF scheduled tasks.)

 

First, do you really mean to display the "results" of scheduled tasks (what output they produce), or do you mean only to track the "status" of their execution (did they run, when, was there any error)?

 

As for the "results" of tasks, those are NOT tracked by CF in any automated way, though you can setup each task to save its output--but it's only the simple name of a file where the results of a given task execution is saved: there is no mechanism to rotate or manage that output if saved.

 

As for tracking the "status" of tasks, even that is rather feeble in CF by default. You may know that you can enable scheduler "logging", in the CF Admin logging settings page. CF then creates a log entry when a scheduled tasks starts. But it does not track when it ends, or whether it had an error, etc. Such info IS shown in the scheduled task UI, but it's not stored in the log.

 

You may know that there is the cfschedule tag, and it has an action="list" that can provide at least some status info on your tasks: 

 

<cfschedule action="list" result="list">
<cfdump var="#list#">

And that may help if you have only such "nightly" tasks, that run only once a night, if you wanted to see how they did.

 

But if you have tasks that may run multiple times (per night or day), then that will also not be satisfactory, as it would have to be run with some frequency, and its output saved somewhere, to track the state of tasks over time. (Do note also that there is a MODE attribute for schedule with server and application values that may be useful to consider.)

 

I will note that under the covers (since CF10) the CF scheduled task mechanism is built atop an open source project called quartz. And even THAT tool does not by default cause even simple logging of tasks. It does offer a plugin archiecture, and is said to offer an optional history plugin to do logging of each task (better than CF would, including the start AND stop), such as was discussed here: https://www.nurkiewicz.com/2012/04/quartz-scheduler-plugins-hidden.html

 

But I have tried to get it to work in the past and found that it did not produce any logging. It may be an underlying logging framework configuration option (for CF) that I have not yet found.  And maybe someone else here (or you) may be motivated to look further into that, or I may get to share new info.

 

Anyway, I wanted to offer these thoughts for your consideration in the meantime.


/Charlie (troubleshooter, carehart.org)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 03, 2020 Mar 03, 2020

Copy link to clipboard

Copied

To add to what Charlie has provided, AFAIK there are no native ways to accomplish what you seek, nor am I aware of any modules created by users that do such.  You would have to code this, yourself.  Or, pay someone else to.

 

As far as keeping track, CF does natively work with Word and Excel.  You could create something that would track the results of the scheduled tasks and append that information to a Word document or Excel spreadsheet and either make it available to the employees outside of the IT sphere, or email it to an org inbox that they have access to.

 

I recently was disappointed that CF provided a mis-named status check of Solr collections (processing, done, success, fail, etc.)  Turns out that the documentation was not written very well, and was actually describing something else and only under a method which is proscribed where I work.  So, as great as CF is, it doesn't include the kitchen sink.  🙂

 

V/r,

 

^ _ ^

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 03, 2020 Mar 03, 2020

Copy link to clipboard

Copied

I have good news, updating what I'd reported below. One CAN get that "extra task logging" to be performed by CF. It's just that in addition to making the changes to the quartz.properties file (in the lib/quartz folder under the cfusion folder, or a sibling folder created for any other CF instance one may create), you do then ALSO need to edit the log4j.properties file, in the lib folder (under cfusion, or a sibling instance's folder). In that latter file, the bottom has 3 lines:

# For Quartz logging
log4j.logger.org.quartz=ERROR
log4j.logger.org.apache=ERROR

which would be changed to:

# For Quartz logging
log4j.logger.org.quartz=INFO
log4j.logger.org.apache=INFO

Then on restarting CF, you would see lines in the coldfusion-out.log (not the scheduler.log), in the logs folder under the cfusion (or an instance) folder.

 

Altascene, I realize you may feel this is all "too much" for your need (nor not well-suited to it). I just wanted to make clear what was possible (for you and other readers).


/Charlie (troubleshooter, carehart.org)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 12, 2020 Mar 12, 2020

Copy link to clipboard

Copied

LATEST

Charlie and WolfShade, thank you both for your replies.  I am really looking for the "results" of tasks, as opposed to whether or not a task ran.  I tried out QuartzDesk, which does a good job of presenting scheduled task "status".  However, it doesn't appear to offer details on the actual task results.  We are going to need to define our own measurements for determining the status of results, and code those into our tasks.  Maybe using using things like FileExists will be part of the mix.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation