Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 01-07-2009, 10:36 PM   #1
Registered: Jun 2008
Posts: 161

Rep: Reputation: 32
Is there a way to access a running process, like cron?

I've got a little web server running on my home network. In order to keep the high-speed internet connection awake, I have a crontab that sends out a ping every 20 minutes.

I launch it by running cron inside a terminal window. I get to see the ping results inside this terminal every 20 minutes. When I close the terminal cron is still there running in the background.

Is there a way to open up another terminal window so that I can view the results of that already-running cron process again?
Old 01-07-2009, 11:18 PM   #2
Registered: Nov 2005
Distribution: Fedora, Redhat
Posts: 372

Rep: Reputation: 101Reputation: 101
Take a look a 'screen'. It has a huge manpage and a ton of options, but once you wade through them it's fairly simple to use.

You can start it with just 'screen'. Issue whatever command you want. Disconnect. Come back later, login, and reattach with either 'screen -r' or 'screen -d -r'. It gives you back your screen like you never left.

You might want to experiment with your $TERM environmental variable. I do an 'export TERM=xterm' before I enter 'screen'.

'screen' s handy too, if you have a flaky vpn connection between your ssh client and the system you are accessing.

And if you have something that is long running, I've found this to work better than 'nohup'ing (or 'disown'ing) a process.



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
cron job running PHP script to update MySQL - access denied error Beauford2008 Linux - Newbie 9 09-24-2008 08:17 PM
Shell Script : Kill a running process when another process starts ashmew2 Linux - General 3 08-20-2008 04:47 AM
Running process from cron with PTTY sebell Linux - Server 3 10-03-2007 08:57 AM
access a running process puter Linux - General 1 07-30-2007 11:22 AM
cron process - info kshkid Programming 7 03-14-2006 02:42 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:24 AM.

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