Answer
No Custom Event is needed here at all — Custom Events are specifically for binding to table changes (insert/update/delete), which doesn't apply to a plain scheduled function call. Instead, put the conditional email logic directly inside the same custom PL/SQL procedure that the Scheduled Database Task already calls: have that procedure call your existing function, check its return value with a plain IF statement, and if the condition is met (e.g. the value equals 0), call Command_SYS.Mail(...) directly from within that same procedure. The Scheduled Task's normal execution then handles the whole check-and-notify flow end-to-end without any separate event mechanism.