On my Synology DS215j I have a scheduled task, that is executed every 5 minutes and checks, if a specific python script is running:
#!/bin/bash
# Import environment variables ...
. /etc/profile
PYSCRIPT="telegram-bot.py"
if ! ps ax | grep -q "$PYSCRIPT"; then
echo "$PYSCRIPT is running"...