There's no native way to trigger an alert if a process gets stuck in a pending state. You may want to look into why that is happening because it should not occur. How often are you saying this happens?
I hate to make a suggestion like this, but if scheduler is not performing correctly for you, have you considered changing the process so that it runs constantly all day long and it has logic built in to only do its job every 5 minutes? The way it sounds to me with it running every 5 minutes, you're already essentially eating up a full license all the time anyway.
I think most people accomplish this kind of monitoring through external tools that query the BP database. (I have seen suggestions to always mirror the production DB and query the mirror. I haven't seen any real reason to do this but I figured I'd point it out)
As for troubleshooting why the session gets stuck as pending... Have you looked around at various logs such as event logs and what not? I think it'd be useful to determine what situation causes the session to get stuck that way. It's also possible that you could solve the issue by upgrading Blue Prism since there were several versions with known scheduler issues. We encountered issues with 6.2, 6.3 and versions around there. However, we've been using 6.4.1 for a little while and have encountered no scheduler issues. And so far I haven't seen anyone report issues about 6.5 scheduler.
Just some things to consider. I feel your pain. Scheduler and alerting features need to be improved.
------------------------------
Dave Morris
3Ci @ Southern Company
Atlanta, GA
------------------------------
Dave Morris, 3Ci at Southern Company