Question Mason Albert · Aug 2, 2022

Log of an individual run of task

Hi,

Is there a way to access the logs of a specific run of a task from the management portal task manager? I'd like to retrieve the output of a given run without going into the entire task history in an output file.

Thank you!

Comments

Mason Albert  Aug 2, 2022 to Eduard Lebedyuk

By a run I mean if a task is scheduled to run every day at midnight, I'd like to access the output only from when it ran on August 1st, for example.

0
Ben Spead · Aug 2, 2022

To clarify Mason, you want to be able to output log information from within your task and store it somewhere associated with the Task run such that it is available via the SMP, correct?

0
Mason Albert  Aug 2, 2022 to Ben Spead

Yes that's correct. I hope that clears things up.

0
Robert Davis · Aug 2, 2022

First, I think that the "Output file" which the Task Manager provides is just overwritten each time the Task runs (haven't verified this, but that's how I read the code). So there really is no history of the Task logs AFAIK. In any case, the Task Manager does not support any sort versioning or history of this output file.

My best suggestion is that you add a "Log Directory" Property to the Task definition, and then the OnTask() method can use that to manage output from the running Task. Perhaps a separate directory for each scheduled Task, and a date/time stamp as part of the file name? This does not give you any direct tie in or access from the Portal, but it should be pretty easy to identify the log for any given run.

0
Ben Spead  Aug 2, 2022 to Robert Davis

Thanks @Robert Davis  - that is very helpful!  Thank you for taking the time to look at the code and suggest a possible way forward

0