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
Killing of a process and send a mail if the process doesnot come up within 2 minutes Prince89 Shell Programming and Scripting 1 02-15-2008 07:10 PM
Leaving Program running but killing the script deaconf19 Shell Programming and Scripting 2 11-16-2007 02:17 AM
script to kill rsh processes running for more than 10 minutes amitsayshii Shell Programming and Scripting 1 06-27-2006 10:12 AM
script to kill rsh processes running for more than 10 minutes amitsayshii UNIX for Advanced & Expert Users 1 06-27-2006 10:07 AM
Convert minutes to hours, minutes, seconds Vozx Shell Programming and Scripting 1 12-09-2005 01:24 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 11-16-2006
ropers's Avatar
ropers ropers is offline
Registered User
  
 

Join Date: Dec 2001
Location: Dublin
Posts: 48
How can I kill and relaunch a task every 15 minutes while a script is running?

Hi there,

I would like to write a script which while running will kill and then execute again a task every 15 minutes.

Here's what I want to do:

Al Jazeera English have a low quality, time-limited 15 minute trial stream up at their site. I.e. when I click on the 56K link, it will play in Real player for Linux (which I have installed on Ubuntu 6.10) but after 15 minutes it will stop playing. At that point I can press play again and it wll again play for another 15 minutes. I am trying to write a script that will:
- curl the .smil file from http://europe.real.com/smil/aljazeera_us_lo.smil
- launch realplayer and play that .smil file
- after 15 minutes, kill realplayer, curl the .smil file again (because due to round robin load distribution I might get on to another server that way, which I want to happen, in order to be a well-behaved user and not to hurt al Jazeera) and then launch realplayer again and play that new .smil file.
- lather, rinse, repeat

I do not want this to happen all of the time (while my computer is booted up), but rather I only want this to happen on demand, e.g. for as long as a certain script is running.

I have looked at cron, but I could not figure out how to do the above. Cron appears to be designed to do stuff at fixed times while the machine is running.

I would be very grateful for any help or suggestions.

Thanks and regards,
ropers

Last edited by ropers; 11-16-2006 at 03:26 PM..
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 02:24 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