https://github.com/nlm/micron
Minimal replacement for cron in containers
https://github.com/nlm/micron
Last synced: over 1 year ago
JSON representation
Minimal replacement for cron in containers
- Host: GitHub
- URL: https://github.com/nlm/micron
- Owner: nlm
- License: mit
- Created: 2020-03-05T12:38:36.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-09-02T13:14:29.000Z (almost 5 years ago)
- Last Synced: 2025-01-21T21:47:33.522Z (over 1 year ago)
- Language: Python
- Size: 6.84 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# micron
Minimal replacement for cron in containers
`micron` is made to easily create scheduled-tasks containers,
with the following limits:
- 1 task per container
- 1 schedule per task (cron-compatible)
- one execution at a time
(if the first execution is not finished in time
for the next schedule, execution is skipped)
## Installation
```
pip install micron
```
## Usage
```
usage: micron [-h] [-x] [-q] schedule program [program ...]
positional arguments:
schedule a cron-like schedule
program the command line to run
optional arguments:
-h, --help show this help message and exit
-x, --exit-on-error exit if the program return-code is non-zero
-q, --quiet do not log micron actions
```
Example
```
micron '0 0 * * *' -- find /var/log -name '*.log' -mtime +30 -delete
```