Skip to main content

Simple process management. Keep a process running in a screen session forever.

Project description

ScreenRun

ScreenRun is a simple process management tool that allows you to keep a process running forever just by adding a single cron job. It utilizes Screen sessions to manage and monitor your processes, making it easy to start, stop, and restart them.

Installation

To install ScreenRun, run the following command:

pip install screenrun

Usage

You can use ScreenRun via the command line or in Python scripts.

Command Line

# Start a new Screen session with the given name and command
> screenrun execute --name nap sleep 60

# List all running Screen sessions
> screenrun list
nap

# Kill a running Screen session by its name
> screenrun kill --name nap

# Keep a command running indefinitely using the persist option
> screenrun persist --name nap sleep 60

# Start a command in a Screen session if it's not already running
> screenrun persist --name nap sleep 60

Add to cron

To ensure your command keeps running, add the following line to your cron configuration:

* * * * * screenrun cron sleep 60

Python

You can also use ScreenRun in your Python scripts:

from screenrun import ScreenRun

screenrun = ScreenRun()

screenrun.execute('sleep 60')

Warning for macOS Users

On macOS, the default version of "Screen" is outdated. For ScreenRun to work properly, you need to install the latest GNU version of Screen. You can do this using Homebrew:

brew install screen

Please note that this requires Homebrew to be installed on your system. If you don't have Homebrew installed, follow the installation instructions before running the above command.

License

Creative Commons Zero v1.0 Universal

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

screenrun-0.1.2.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

screenrun-0.1.2-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file screenrun-0.1.2.tar.gz.

File metadata

  • Download URL: screenrun-0.1.2.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.10

File hashes

Hashes for screenrun-0.1.2.tar.gz
Algorithm Hash digest
SHA256 57d7e986bc49388956a214dc0c0970c5885da655ccadee615f990183ab8af6a8
MD5 f3d8d24cd17affb5303575c0497967dd
BLAKE2b-256 5a6f17049d9cd9b5dd8a05f81509d3ef5770d277c7bb2cd9f86a014b2359c62e

See more details on using hashes here.

File details

Details for the file screenrun-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: screenrun-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.10

File hashes

Hashes for screenrun-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 43995178f96e5b8a791a0247835d73748ffd17ef23d320881b6e22746a2c3ad8
MD5 d05c45b61efdbaa0e11cb0ebd7eedef3
BLAKE2b-256 4ba86cdaaaaf65ee73b7dd39809b036f525959669c8f00d11242be35300bfd96

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