Velvet Star Monitor

Standout celebrity highlights with iconic style.

news

'nohup' command is not working with 'watch' command

Writer Matthew Martinez

I have tried to run nohup watch -n 5 python3 main.py & but it is not working anymore. Is there any way to run watch -n 5 python3 main.py & command in background?

1 Answer

You could just run it in a tmux or screen session and leave it there. Or write a small upstart script fx

description "main"
author ""
start on filesystem and net-device-up IFACE!=lo
exec python3 main.py

and let the main.py handle the iteration.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy