Skip to main content

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"

Download files

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

Source Distribution

appinstance-20.tar.gz (2.4 kB view details)

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for appinstance-20.tar.gz
Algorithm Hash digest
SHA256 3a75c6a0d49ccb78aaa6682eb756238aea269df7047ca8aca2f80b6dfd298c91
MD5 b38a706d1c7df3bfd6cac75cc25af17c
BLAKE2b-256 078d1a8d7d48ba1aee74e862fedf7a3475f563336915a4c606dcd3e5f5586948

See more details on using hashes here.

Release history Release notifications | RSS feed

26

1 file

23

1 file

22

1 file

21

1 file

This release

20 This release

1 file

19

1 file

17

1 file

13

1 file

12

1 file

11

1 file

10

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page