Nohup is not writing log to output file

You can run Python with the -u flag to avoid output buffering:

nohup python -u ./cmd.py > cmd.log &

Leave a Comment