LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-14-2008, 04:56 AM   #1
pnsidhu
LQ Newbie
 
Registered: May 2008
Posts: 4

Rep: Reputation: 0
launch job remotely


Hi
I am new to linux
i wanted to know if there is any way to launch a job in remote machine like wget,ftp download etc. i can do it after logging into the remote server through ssh and running wget //url/ &. but the job is killed if i logoff from the server
can anyone help me out
Thanks in Advance
siddhu
 
Old 05-14-2008, 05:09 AM   #2
Agrouf
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: LFS
Posts: 1,591

Rep: Reputation: 79
try this:
nohup wget //url/ &
 
Old 05-14-2008, 05:52 AM   #3
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,762

Rep: Reputation: 1587Reputation: 1587Reputation: 1587Reputation: 1587Reputation: 1587Reputation: 1587Reputation: 1587Reputation: 1587Reputation: 1587Reputation: 1587Reputation: 1587
Use
Code:
screen wget //url/
Hit CTRL-A and then D to detach from this session and logout
To resume your session, login and run:
Code:
screen -r
Read the screen man pages for more options

Regards

Last edited by bathory; 05-15-2008 at 01:58 AM.
 
Old 05-14-2008, 06:32 AM   #4
pnsidhu
LQ Newbie
 
Registered: May 2008
Posts: 4

Original Poster
Rep: Reputation: 0
Thanks Agrouf and Bathory for the reply ,i tried with the both options , but when i logout and close the terminal the job also closes
i have tried with xcalc on ubuntu systems
 
Old 05-14-2008, 07:26 AM   #5
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,762

Rep: Reputation: 1587Reputation: 1587Reputation: 1587Reputation: 1587Reputation: 1587Reputation: 1587Reputation: 1587Reputation: 1587Reputation: 1587Reputation: 1587Reputation: 1587
Are you sure you're doing it right?
Login the remote box through ssh or whatever you want.
Use screen to run an application:
Code:
screen vi test.txt
Prest Ctrl-A and then D
You'll be return to the shell
Logout of the remote box.
Login again and run
Code:
screen -r
You will see the vi editor.
Code:
screen -list
should tell you if there are any other screen sessions running. In that case you should use:
Code:
screen -r pid.tty.host
using the "pid.tty.host" from the previous command.
 
Old 05-14-2008, 07:36 AM   #6
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
I tend to use "at now"

See man at, but basically, log on, type at now (or some other time). You'll see

at>

Type the command to run, say

at> /root/script.sh
at> Ctrl-D

Ctrl-D exits the at environment.

The user that submitted the at job will get an email at the end. There are commands such as atq to see what;'s going on

That's it
 
Old 05-14-2008, 07:38 AM   #7
Agrouf
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: LFS
Posts: 1,591

Rep: Reputation: 79
Quote:
Originally Posted by pnsidhu View Post
Thanks Agrouf and Bathory for the reply ,i tried with the both options , but when i logout and close the terminal the job also closes
i have tried with xcalc on ubuntu systems
If you don't have or don't want to use screen, try:
nohup xcalc &
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
X remotely gloomz Linux - General 3 01-10-2008 03:38 PM
Can you start a job without getting the job number spit back out? BrianK Linux - General 5 12-13-2007 08:09 PM
Login Remotely Metallimoons Linux - Networking 7 11-21-2005 04:45 AM
X remotely linuxnube Linux - General 3 01-26-2004 03:17 AM
Netscape remotely ishamel Linux - Security 0 02-04-2001 05:46 PM


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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration