Skip to main content

A python implementation of a cron job scheduler

Project description

Process Boss

Python CI Build PyPI Downloads

A Cron job scheduler implemented in Python

1. Installation

pip install process_boss

2. Usage

Create a configuration file in config.yaml somewhere on disk, then run process boss:

python -m process_boss ~/config.yaml

Example: Run a script on Monday mornings

processes:
  - id: test-job
    cron: "0 7 * * MON" # every Monday at 7:00 AM
    command: "echo 'Hello World!'"

3. Configuration reference

Property Required Default Description
scheduler.maxWorkers No 10 Each process is executed in a thread. This is the maximum number of threads that should be used
scheduler.loop.restartSeconds No 15 Number of seconds to wait before reading the config again and evaluating all processes' cron expressions
scheduler.loop.runOnce No False If set to True, the processes in the config file will only be read and executed once, after that process_boss exits.
logs.enabled No False If set to True, it enables logging of both the scheduler, and each execute process in a separate file. The below two are required to set if enabled.
logs.schedulerLogDir No "" Absolute directory path where the log file of the scheduler can be created per each process. Contains metadata about when a given process will run next, and with what parameters. Eg: /var/log/process_boss/scheduler
logs.processLogDir No "" Absolute directory path where the log file of each process can be created, one per execution. Contains the parameters used before ezecution, and the STDOUT and STDERR output of the process. Eg: /var/log/process_boss/process
processes[].id Yes - Non-empty arbitrary string. Eg: my-process
processes[].cron Yes - Non-empty string, should be a CRON expression. Eg. 0 7 * * MON
processes[].command Yes - Non-empty string, should be an executable command. Eg. python script.py
processes[].runAtStartup No False If set to True, the process will be executed immediately when process_boss starts, instead of waiting for the next CRON match

4. Maintainer documentation

See: docs/README_MAINTAINER.md

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

process_boss-0.0.5.tar.gz (9.2 kB view details)

Uploaded Source

Built Distribution

process_boss-0.0.5-py3-none-any.whl (12.7 kB view details)

Uploaded Python 3

File details

Details for the file process_boss-0.0.5.tar.gz.

File metadata

  • Download URL: process_boss-0.0.5.tar.gz
  • Upload date:
  • Size: 9.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for process_boss-0.0.5.tar.gz
Algorithm Hash digest
SHA256 fa9a7be4b3c773eead5e1b97f3be5a2d0eae7e5a3620c43bd9aab2bed2b8be43
MD5 9135a87f2cae11801bd1927065fe615f
BLAKE2b-256 d05c1b0b681cfb4e2354e539fdaa99d863affe66641de022a36e53c2e45de563

See more details on using hashes here.

File details

Details for the file process_boss-0.0.5-py3-none-any.whl.

File metadata

File hashes

Hashes for process_boss-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 ae2600349a86b19c41e733893d271f0dc6e2b5026c1afd9bdbc31d594488eac4
MD5 e62254a66e70e1d9780db6583787701a
BLAKE2b-256 11e79f5446d591dbd0c7d171ae7980d696bb159c7d75aa5a86cf99978efd06e3

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