[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [help-gnubatch] Run only one job at a time

From: Reuti
Subject: Re: [help-gnubatch] Run only one job at a time
Date: Fri, 17 May 2013 17:44:07 +0200

Am 17.05.2013 um 17:40 schrieb Reuti:

> Hi,
> Am 17.05.2013 um 05:09 schrieb Raniere Silva:
>> I need to setup a queue of jobs from many users to run in a machine but only
>> one job can run at a time. Can I do that with GNUbatch?
> You can define variable and decrement it by each start of a job while the 
> availability is at the same time the condition for the job to start:
> $ gbch-r -c "myvar>0" -s "myvar-=1"
> By default the change to myvar will be reversed at the end of the job 
> automatically.

I forgot: the variable myvar needs to be defined as 1 for the above to work. 
Maybe the reverse and leaving the initial value at zero would be convenient:

$ gbch-r -c "myvar<1" -s "myvar+=1"

-- Reuti

> -- Reuti
>> Thanks,
>> Raniere

reply via email to

[Prev in Thread] Current Thread [Next in Thread]