[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [NOVICE] lade et script køre i given tid



Ivar Madsen wrote:
> Jeg har et script som spiller et musik stykke, og afslutter.
> 
> Jeg vil nu godt have sat en gentagels lykke om, således at den spiller i det
> uendelige.
> scriptet skal så afbrydes efter det antal minutter som der angeves som
> parameter.
> 
> Hvorledes gør jeg det smartes?


timeout 42 ./ditSkript

TIMEOUT(1)
                                                                     TIMEOUT(1)

NAME
       timeout - run command with bounded time

SYNOPSIS
       timeout [-signal] time command ...

DESCRIPTION
       timeout executes a command and imposes an elapsed time limit.  The
command is run in a separate POSIX process group so that the right thing
happens
       with commands that spawn child processes.

       Arguments:

       -signal
              Specify an optional signal to send to the controlled process.
 By default, timeout sends SIGKILL, which cannot be  caught  or  ignored.  The
              signal must be provided in its numerical value.

       time   The elapsed time limit in seconds after which the command is
terminated.

       command
              The command to be executed.

> Det første jeg lige kan komme på, er at kalde "at" inden lykkes startes, og
> så sætte systemmet til at slå processen ned med en "killall mplayer &&
> killall script"
> Men der må vel være noget smartere?
> 


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-09-01, 02:04 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *