P
P
PashaLynx2020-11-11 08:07:36
linux
PashaLynx, 2020-11-11 08:07:36

How can I make sure that the script doesn't exit after logging out of ssh in Azure?

Good afternoon. I say right away - I'm a beginner, so maybe I'm doing something wrong. There are two python scripts. I uploaded them to Azure and run them in a virtual environment. I connect to the machine via ssh through the terminal. As soon as I close the terminal, the scripts stop working. I just ran them with the command - python3 bot.py & python3 importdata.py
What am I doing wrong? Thanks in advance.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sanes, 2020-11-11
@PashaLynx

python3 bot.py & python3 importdata.py &
or see screen

P
paran0id, 2020-11-11
@paran0id

and you can also make them systemd services, then you can configure autostart on boot, and restart on crash, and other goodies

A
Alexey Dmitriev, 2020-11-11
@SignFinder

Another option is to use nohup

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question