The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
script to monitor process running on server and posting a mail if any process is dead pradeepmacha Shell Programming and Scripting 13 03-06-2009 07:33 AM
Running app after logout and monitoring ncatdesigner High Level Programming 1 04-21-2008 05:39 AM
How to create a dummy process of a process already running? shambhu UNIX for Advanced & Expert Users 3 08-31-2007 10:22 AM
need help with this background wget process. mikey1090 Shell Programming and Scripting 2 04-13-2007 02:40 AM
Top running process caprikar UNIX for Advanced & Expert Users 1 02-17-2004 10:14 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 02-15-2006
mikey1090 mikey1090 is offline
Registered User
  
 

Join Date: Feb 2006
Posts: 4
Keep process running (wget) and logout

well, i have only been learning about linux, unix and shells for a few days.

For my online game to work, i need run a file each 10 seconds. Running that file will update mysql data, causing my online game to "tick". This adds resources and fights battles in game.

I know that i need to use a bakground process, a wget commad.


Code:

#!/bin/bash

while true; do
wget my_url/tick.php
sleep 10
done

exit 0
that code runs the process in the ofreground. i want to exit Putty, logiut, and keep that process running for ever.

Can anyone hp me, or advise me how to do this?

Thanks, Mike
  #2 (permalink)  
Old 02-15-2006
ScatterBrain ScatterBrain is offline
Registered User
  
 

Join Date: Feb 2006
Posts: 61
i suppose you can run the script with the 'nuhup' and the '&'. this should keep it running after logout.
  #3 (permalink)  
Old 02-15-2006
zazzybob's Avatar
zazzybob zazzybob is offline Forum Advisor  
Registered Geek
  
 

Join Date: Dec 2003
Location: Melbourne, Australia
Posts: 2,100
Quote:
Originally Posted by ScatterBrain
i suppose you can run the script with the 'nuhup' and the '&'. this should keep it running after logout.
nohup

Cheers
ZB
  #4 (permalink)  
Old 02-15-2006
ScatterBrain ScatterBrain is offline
Registered User
  
 

Join Date: Feb 2006
Posts: 61
hahahha... yes. sorry about the typo.

Quote:
Originally Posted by zazzybob
nohup

Cheers
ZB
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 06:23 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0