[Python] "nohup python3 .. &" ends once I disconnect from a server

Discussão em 'Python' iniciado por Stack, Junho 21, 2025.

  1. Stack

    Stack Membro Participativo

    This command

    nohup python3 main.py > my_log.log 2>&1 &


    will end once I disconnect from a server. That is, if I disconnect and then connect 10 seconds later, the task, or a job, will be gone.

    However, if I stay on a server, it continues to work as long as it needs, with no problem.

    Why? How to make it work in background even after I disconnect?

    It's an AWS Debian server.

    Continue reading...

Compartilhe esta Página