PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Serveur - Sécurité et techniques > comp.unix.shell > Run and kill program after specific time
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
comp.unix.shell Using and programming the Unix shell.

Run and kill program after specific time

Réponse
 
LinkBack Outils de la discussion
Vieux 07/01/2008, 15h21   #1
yatsek@gmail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Run and kill program after specific time

Hi there.
Is there any simple way to allow program running for specific time and
then just kill it? I.e. like :

$> time ./script.sh

gives how long script was running I would like to have sth. like let's
say command "timer":

$> timer 10m ./script.sh

Which would allow script to be alive for 10 minutes and then it would
kill it. Is it possible to do this some easy way or I need to kill it
manually from other script?

Greetings
Yatsek
  Réponse avec citation
Vieux 07/01/2008, 15h28   #2
Cyrus Kriticos
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Run and kill program after specific time

yatsek@gmail.com wrote:
>
> Is there any simple way to allow program running for specific time and
> then just kill it? I.e. like :
>
> $> time ./script.sh
>
> gives how long script was running I would like to have sth. like let's
> say command "timer":
>
> $> timer 10m ./script.sh
>
> Which would allow script to be alive for 10 minutes and then it would
> kill it. Is it possible to do this some easy way or I need to kill it
> manually from other script?


http://groups.google.de/group/comp.u...c83025322c7c86

--
Best regards | Be nice to America or they'll bring democracy to
Cyrus | your country.
  Réponse avec citation
Vieux 07/01/2008, 15h52   #3
yatsek@gmail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Run and kill program after specific time

On Jan 7, 4:28pm, Cyrus Kriticos <cyrus.kriti...@googlemail.com>
wrote:
> yat...@gmail.com wrote:
>
>
> http://groups.google.de/group/comp.u...c83025322c7c86
>


yupi!!! works

Big thx

--
Yatsek
  Réponse avec citation
Vieux 27/01/2008, 00h11   #4
Dan Stromberg
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Run and kill program after specific time

On Mon, 07 Jan 2008 16:28:39 +0100, Cyrus Kriticos wrote:

> yatsek@gmail.com wrote:
>>
>> Is there any simple way to allow program running for specific time and
>> then just kill it? I.e. like :
>>
>> $> time ./script.sh
>>
>> gives how long script was running I would like to have sth. like let's
>> say command "timer":
>>
>> $> timer 10m ./script.sh
>>
>> Which would allow script to be alive for 10 minutes and then it would
>> kill it. Is it possible to do this some easy way or I need to kill it
>> manually from other script?

>
> http://groups.google.de/group/comp.u...c83025322c7c86




Here's a program I wrote to do the same thing:

http://stromberg.dnsalias.org/~strombrg/maxtime.html

....but glancing at the other one, I believe mine will:
1) Be more granular - not necessarily a good thing
2) Be less busy-waiting - means less CPU load

I've used in a number of contexts, including with NFS hard mounts from
unreliable servers.

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 17h40.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,12107 seconds with 12 queries