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 pip setuptools wheel 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-scheduler\\logs\\scheduler"
processLogDir: "C:\\Desktop\\apps\\process-scheduler\\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-scheduler 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
twine upload dist/*
Project details
Release history Release notifications | RSS feed
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.1.tar.gz
(6.8 kB
view hashes)
Built Distribution
Close
Hashes for process_boss-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 55d71443d5ed1e5071a95526a95665c40079307f16025faf722525b220f316e2 |
|
MD5 | 9a9b25a43f2e43271750fe8dd5b77612 |
|
BLAKE2b-256 | 4a16380a1fbbb4d3e28cf40485bd36d0c4f3e2022cd6ed328ebd74b115bf2978 |