Skip to main content

A python implementation of a cron job scheduler

Project description

Process Scheduler

A python implementation of a cron job scheduler.

1. Install from source then activate venv

Install venv to set up your virtual environment

pip install --upgrade venv

Go to project root and create your virtual environment

cd <PROJECT_ROOT>
python -m venv venv

Activate your virtual environment

.\venv\Scripts\activate

Install project dependencies

pip install -r requirements.txt

Install module locally, so you can import it as a module

pip install -e .

2. Run it

First install from source (see above), then define your configuration in a YAML file

loopRefreshSeconds: 15
maxWorkers: 10
schedulerLogDir: "C:\\Desktop\\apps\\process-boss\\logs\\scheduler"
processLogDir: "C:\\Desktop\\apps\\process-boss\\logs\\process"
processes:
  - id: test-job
    cron: "0 7 * * mon"                          # == 7:00 AM every Monday
    command: "python C:\\Desktop\\my-process.py" # Invoke my python script
    runAtStartup: true                           # Run immediately when scheduler starts, then follow cron definition

Run it

python -m process-boss C:\\Desktop\\config.yaml

3. Test

TODO

4. Build and upload

Install dependencies

pip install --upgrade setuptools wheel build twine

Build the package (wheel and sdist)

python -m build 

Ensure .pypirc in user folder is correct, then upload

python -m twine upload dist/*

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.2.tar.gz (6.6 kB view hashes)

Uploaded Source

Built Distribution

process_boss-0.0.2-py3-none-any.whl (7.8 kB view hashes)

Uploaded Python 3

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