2

I usually use nohup to run any task in background in linux

nohup python sss.py &

What is the similar command used to run a background task in windows?

1 Answer 1

3

Sort of? In Windows, there's start which launches another command outside of your current CLI session. The down side is that the process isn't attached in any way to the window you launched it from so you don't get output sharing like you would in Linux.

An alternative to achieve this may be to use something like Cygwin which gives you (most of) bash on Windows. (Update 2020: Windows 10 has Windows Subsystem for Linux now. This allows you to run a good chunk of Linux on a Windows host.)

3
  • 1
    Would you know whether processes started asynchronously with start are stopped when the user signs off, when the screen is locked, or when the console is switched to a different user (i.e. ctrl-alt-del Switch User)?
    – init_js
    Commented Jul 17, 2018 at 3:41
  • @init_js You'd be better off asking that as a question on Superuser rather than as a comment on an old answer.
    – Ouroborus
    Commented Jul 17, 2018 at 20:01
  • The answer's still valid, despite its age. I had asked a similar question here, but forgot to add a link to it!
    – init_js
    Commented Jul 18, 2018 at 1:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .