Skip to main content

Check if an app with the same name is running, supports parameters.

Project description

Check if an app with the same name is running, supports parameters.

install

pip install appinstance

intention

In cronjobs to detect if a program with the same arguments is already running

install

pip install appinstance

usage

from appinstance import AppInstance, AppInstanceRunning
import time

try:
    # use Appinstance context manager, "arg1" is a good place for commandline variables.
    with AppInstance("arg1", True):
        print "sleep for 2 sec"
        time.sleep(2)
except AppInstanceRunning:
    print "already running"

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

appinstance-13.tar.gz (2.1 kB view details)

Uploaded Source

File details

Details for the file appinstance-13.tar.gz.

File metadata

  • Download URL: appinstance-13.tar.gz
  • Upload date:
  • Size: 2.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for appinstance-13.tar.gz
Algorithm Hash digest
SHA256 c03da6556e209dbe2e94688451a6867364cf4ad4a442a0792494be992e9bc807
MD5 3745865a8396f43f7443410507b4c00a
BLAKE2b-256 1112cba88f0232dbdfd9f57a862ebb1e044c1836d86cf098f5fe2f26b3756de2

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page