I have a python script, practice_one.py, that I’d like it to run forever in Ubuntu Linux, and has the following:
while True:
# Code
And I attempted nohup python practice_one.py & but got the message nohup: ignoring input and appending output to ‘nohup.out’.
Then when I hit the enter key, the outputs another message: [1]+ Exit nohup python practice_one.py
How come it just exits automatically? What could I be doing wrong?
EDIT
Attempted:
nohup python practice_one.py </dev/null &>/dev/null &
And get [1] 61122 then when I press enter I got [1]+ Exit nohup python practice_one.py </dev/null &>/dev/null &
It used to work but now exits.. What could be the issue now?