How to limit the number of running instances of a script?
I would like to allow only one instance of a script to run at any moment.
I've tried the following solution to count the instances but the result is always the number of running instances plus one and I can't find the problem
Hello,
I'm trying to write a script that checks for previous instances of the same script which may still be running (this script is scheduled to run every 30 minutes). I want to somehow use the pid from each instance to make sure the previous one isn't running before continuing with my... (5 Replies)
Hello, I have some 150 Cron Jobs running under my UNIX account. I want to add some more jobs. Is there a limit to the number of cron jobs that can be run on an account?
Thank you.
Pramodini (8 Replies)
I currently use LaTeX together with a sed script to set cloze test papers for my students. I currently pepend and equals sign to the front of the words I want to leave out in the finished test, =perpendicular, for example. I am able to number the blanks using a variable in LaTeX. I would like to... (8 Replies)
Hi Guys,
Need you help in one point!
I am working on one shell script which takes following steps :
1. Taking one query result from oracle database
2. Exporting that result to Xls file
3. Mailing that file to my own mail ID
Now, I want to give a threshold limit to one of the column... (0 Replies)
Hello to all @here,
as Iīm new to this forum, I will try to start in a easy way for my first post. Iīm not beginner in scripting, but also not a proffessional. So please keep easy, if I donīt understand your explanation at once ;) I donīt mean it in a bad way!
Here is the Problem:
There were... (2 Replies)
I want to run my shell script to the limit number.Suppose I know in advance that MAX=5 then I want that my script run 5 times only.Something like below$ vi testingMAX=5COMMAND="ssh -l stpuser VHLDVWSAD001 /projects/st/utils/deploy/deployall.sh >/dev/null 2>&1 &" ; sleep 20;count=0while... (2 Replies)
I'm likely going to explain this clumsily, so apologies in advance:
I have the following script:
#!/bin/bash
pidPrefix="logGen"
checkPrime ()
{
if /sbin/ifconfig eth0:0|/bin/grep -wq inet;then isPrime=1;else isPrime=0;fi
}
killScript ()
{
/usr/bin/find /var/run -name... (4 Replies)
Input
A.1 Q.1
A.1 Q.2
A.1 Q.3
A.2 Q.4
Explanation:
Final Output
A.1 Q.1 s1 t1
A.1 Q.2 s1 t2
A.1 Q.3 s1 t3
A.2 Q.4 s5 t5
---------- Post updated 09-28-12 at 03:38 AM ---------- Previous update was 09-27-12 at 09:10 AM ----------
Hi Guys, I was able to do until... (11 Replies)
I'm trying to create a minimal, crude keylogger for X using only a shell script. I was quickly stumped: Why do these two commands entered in a terminal emulator produce output when I type...
$ xinput test 6 | grep press
$ xinput test 6 | awk '{print $3}'
...but this command produces no... (13 Replies)
Discussion started by: DevuanFan
13 Replies
LEARN ABOUT XFREE86
flush
FLUSH(1) General Commands Manual FLUSH(1)NAME
Flush - GTK-based BitTorrent client
SYNOPSIS
flush [OPTIONS] [TORRENT_FILE]...
DESCRIPTION
Flush is a GTK-based BitTorrent client. You can use it to download files from the BitTorrent network.
You can control already running instance, for example, by following commands:
flush -o --download-rate-limit=100
flush --start=all
FEATURES
* Controlling running instance by command line interface, such as:
* Starting/stopping torrents.
* Changing download/upload rate limit.
* Changing maximum connections limit.
* Running many instances with different configs from the same user.
* Automatic copying finished downloads to specified directory.
* Setting custom download path for each file of the torrent.
* Ability to choose torrent file's character set encoding.
* Automatic torrents loading from specified directory.
* Automatic pausing and removing old torrents.
* Temporary pausing and resuming torrents.
* Overall and current session statistics.
* Creating your own torrent files.
* IP filter.
OPTIONS --version
Show program version and exit.
--help Show help options and exit.
--config=DIRECTORY
Configuration directory path (default: ~/.flush).
--download-rate-limit=SPEED
Set download rate limit (KB/s).
--upload-rate-limit=SPEED
Set upload rate limit (KB/s).
--max-uploads=NUMBER
Set maximum uploads.
--max-connections=NUMBER
Set maximum connections.
--start={all,downloads,uploads}
Start torrents.
--stop={all,downloads,uploads}
Stop torrents.
-o, --only-pass
Only pass commands to already running Flush instance. Does not start new instance if it is not running yet.
FILES
~/.flush
Default configuration directory.
BUGS
On startup Flush finds already running instances via DBus session bus. Therefore it is necessary to run Flush in a single session bus
(usual in X session bus) to prevent running several instances with one configuration path.
Please notice that when you are running Flush from console or by cron, when DISPLAY environment variable is not available, Flush finds
already running GUI instance without problems via ${config_path}/dbus_session link, which all GUI instances are creating when they have
owned DBus name. This makes it possible to control running Flush GUI instances from cron.
AUTHOR
Flush was written by Dmitry Konishchev <konishchev@gmail.com>.
This manual page was written by Dmitry Konishchev <konishchev@gmail.com>.
Jun 11, 2009 FLUSH(1)