0

Is it possible? For example the script understands if it was executed not in background and it closes and reopens in background with nohup python3 script.py &? Can I do that with sys.argv?

Allexj
  • 1,375
  • 6
  • 14
  • 29

1 Answers1

0

It's possible.You can register it be a service.This site maybe be helpful:How to make a Python script run like a service or daemon in Linux

Saige Zhang
  • 737
  • 1
  • 7
  • 18