How to send Email when Task Errors Out

I realize there’s a similar topic about a Scheduled Task, but in this case, the Task is not considered Scheduled by Epicor.

In specific, the Build Project Analysis task is being done nightly for a given set of projects. Service Connect is building the list and submitting the task. Epicor is never executing the Ice.SysTask.SetSysTaskStatusForPendingTask method for Build Project Analysis. I’m not managing to get a Post Process BPM on the SysTask.Update or UpdateExt to work reliably either. But I do reach that method at least.

Ideas?

@MLamkin If the task in in SysTask or any table you can query in SSMS then you can email from there.

I do this for reports that are running over X minutes or MRP that has not updated LastActivityOn in X minutes.

If that is a possibility then I will post the script.

I hadn’t thought of that, something that runs in SQL Server itself. That’s a good idea :slight_smile:

you can build a BAQ filtered to whatever you targeting then attach running it to any simple system process task including emailing the BAQ results.

Greg, Yes please! :slight_smile:

@askulte Here are a couple of samples. One is plain and the other is formatted. You have to have Database email working on the sql server and then make scheduled job once you have tested the script.

Greg

Job Closing Issues sample.sql (3.2 KB)
MRP Hung email.sql (804 Bytes)

That’s slick! Thanks, @gpayne.

1 Like