Search results

  1. Z

    Check if background process is running or not

    Finally, I've got the problem solved in the python-script itself. Using psutil and - as an important part - not only looking for the process, but also for the called cmd; the problem was, that the process-name is just python3 and in addition the name of the script is telegram-bot.py. Thanks to all!
  2. Z

    Check if background process is running or not

    Thank you for the pgrep tip - but unfortunately the result is the same as with ps ax... - the script is started again and again! For some reason,the process - if run in the background - cannot be "seen" by the Task?
  3. Z

    Check if background process is running or not

    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"...
Top