Hello All,
Does anyone know how to send a notification that a scheduled task has failed?
Respectfully,
Utah
Hello All,
Does anyone know how to send a notification that a scheduled task has failed?
Respectfully,
Utah
Data Directive in the SysTask table perhaps?
How easy is that! Kicking myself over here!
What do you think about enabling data directives for that table though? Would it slow other tasks down?
Should be fine just do it async
Would you do an in-transaction or standard data directive? It seems that the temporary table ttSysTask only shows tasks in a PENDING status and I need the ERROR status which is after the fact…
Standard for emailing.
That part makes sense, but how would you get the status of a completed task?
It seems the ttSysTask table only has PENDING tasks, would I then need to LINQ into the Db.SysTask table to find the final status of the task ?
When the task is updated to ERROR it should go through the Data Trigger… (I hope)? Is that not the case?
It doesn’t seem to be the case. Even when I query the Db.SysTask table it still says pending.
Maybe should do a method directive? Do you see any downfalls to that?
Pending means something is up with your Task Agent and the report/process has not been run yet.
The TaskStatus column with get changed to ERROR if the report/process fails.
Thanks, yeah I am not concerned with the pending status, I would just like the final status after it has been ran.
Respectfully,
Utah
There is no method directive for this.
This is the update method. Do you see anything wrong with this?
It likely won’t get called. I don’t think they use that specific BO to update the tasks… But give it a shot.
I found one method under the SysTask BO that updates the task status for a pending task. They were quite detailed when they named this method.
@josecgomez I can use that method’s variable (sysTaskNum) to retrieve the matching row from the Db.SysTask table which allows me to filter for the scheduled task that I am looking for using SysTask.AgentSchedNum == xMyAgentSchedNum.
Would you suggest running a post processing method directive as asynchronous as well?
Would you suggest using this method directive in the first place?
If that Method is actually being called then you are golden, post processing async is your best friend.
Thanks a lot for your help this morning.