Notifications from a widget

Hi everyone!

I’m building a widget and would like it to run in the background to monitor vital signs continuously, then trigger an alarm and/or push a notification when a certain threshold is reached.

Is this possible with a widget? Can it run or be called in the background, or send notifications to the user?

Thanks!