I have a batch process where it's intermittently failing due to what looks like the batch query timing out (details are here if you're interested).
The error ends up looking like this in my log.
I would like for me or the org's admin to receive an email notification if this occurs. Currently nothing's being sent by SF, I assume because this is a low-level unhandled exception in SF, and the batch is "Aborted" rather than "Failed".
Furthermore, since it's happening on the query, the execute method is never getting run, so I don't think I can do a try/catch in my batch to catch this error and report it.
How can I provide a notification on this sort of timeout?
Thanks!