I'm guessing you're running the command via ssh
and want to log out between running and checking the log. To do this run:
nohup nice -n 5 python3 blah.py > log.txt &
This will prevent killing the program on logout. As well nohup redirects stderr
to stdout
, which also might be what's causing an empty log.txt
file.