Hi @Ozra Hasannejad ,
Welcome to Microsoft Q&A!
I found a good blog you can refer to. Perhaps, you will get some inspiration from it.
IDENTIFYING LONG RUNNING SQL AGENT JOBS SCRIPT
The example is to alert the DBA team using database mail if the currently running job exceeds 150% of the average (any number you can change).
Best regards,
Seeya
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.