LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   running asynchronous jobs (https://www.linuxquestions.org/questions/linux-general-1/running-asynchronous-jobs-260964/)

Raptor Ramjet 11-30-2004 11:56 AM

running asynchronous jobs
 
Hello,

I would like to be able to ssh into my linux box, issue a "wget" command to run asynchronously, then close the ssh session. i.e. I would like to issue the "wget" command such that it continues to run to completion after I've closed the ssh session to my box.

Now so far I've looked into using the "&" suffix on my "wget" command to try to run it in the background but this didn't seem to work.

So if anyone could confirm that this is possible ? and give me some pointers as to how to do it ? I'd be most grateful.

n.b. I realise I could do something similar by creating a scrtipt and running it from a cron job but I'd like something quick and dirty that I can do from an ssh session.

That way I can use my lunchtimes at work to set my home server downloading some fresh apps ready for me to try when I get home :)

Thankyou

trickykid 11-30-2004 12:44 PM

Start a screen session... then you can just save the whole terminal session or connect to it later at all times.. etc.

man screen

hutuworm 11-30-2004 07:46 PM

After you exited the ssh session, wget will run in background automatically, if it detects that can't output log to screen, it will redirect output to a log file.

Raptor Ramjet 12-01-2004 02:49 AM

Cheers for the replies !

However having done a quick "man screen" this looks to be a most "excellent thing" (tm) so I'll give it a try later on today (when I'm at work).

And I'll also try using "wget url &" again later today as it definitely didn't work last time. Mind you the download may have got broken or something so I asked the question to confirm that this was the right thing to do (no point doing loads of experiments if I was "barking up the wrong tree")

Thanks again for the replies.


All times are GMT -5. The time now is 08:40 AM.