<commit_before># The Concept
**Stitch together a Docker job scheduler, distributed locking, task runner**


Project: [https://github.com/sstarcher/job-runner]
(https://github.com/sstarcher/job-runner)

Docker image: [https://registry.hub.docker.com/u/sstarcher/job-runner/]
(https://registry.hub.docker.com/u/sstarcher/job-runner/)

[![](https://badge.imagelayers.io/sstarcher/job-runner:latest.svg)](https://imagelayers.io/?images=sstarcher/job-runner:latest 'Get your own badge on imagelayers.io')
[![Docker Registry](https://img.shields.io/docker/pulls/sstarcher/job-runner.svg)](https://registry.hub.docker.com/u/sstarcher/job-runner)&nbsp;

* Job Scheduler: Cron
* Distributed Locking: Consul
* Task Runners: Kubernetes


### Run Methods
* Cron
  * If ran with no command argument it will start in cron mode and run on the cron schedule.  
  * Cron functionality can be disabled for an entire jobs yaml file by adding `SCHEDULED` under the configuration for a job yaml
* Single Job
  * If a job name is specified it will run the job, tail the logs, and exit when the job is finished.
  * Lockers are disabled in this mode

### Deployment Methods

```
apiVersion: v1
kind: Deployment
metadata:
  name: job-runner
spec:
  replicas: 1
  template:
    metadata:
      labels:
        name: job-runner
    spec:
      containers:
      - name: job-runner
        image: sstarcher/job-runner:latest
```


### Runner Kubernetes
  * Set `KUBERNETES_MASTER` to your Kubernetes cluster url example `http://127.0.0.1:8080`


### Lockers<commit_msg>updating readme<commit_after># The Concept
**Stitch together a Docker job scheduler, distributed locking, task runner**

[![CircleCI](https://circleci.com/gh/sstarcher/job-runner.svg?style=svg)](https://circleci.com/gh/sstarcher/job-runner)
[![](https://imagelayers.io/badge/sstarcher/job-runner:latest.svg)](https://imagelayers.io/?images=sstarcher/job-runner:latest 'Get your own badge on imagelayers.io')
[![Docker Registry](https://img.shields.io/docker/pulls/sstarcher/job-runner.svg)](https://registry.hub.docker.com/u/sstarcher/job-runner)&nbsp;

This repo outputs reaps and alerts on finished kubernetes jobs.

Project: [https://github.com/sstarcher/job-runner]
(https://github.com/sstarcher/job-runner)

Docker image: [https://registry.hub.docker.com/u/sstarcher/job-runner/]
(https://registry.hub.docker.com/u/sstarcher/job-runner/)


* Job Scheduler: Cron
* Distributed Locking: Consul
* Task Runners: Kubernetes


### Run Methods
* Cron
  * If ran with no command argument it will start in cron mode and run on the cron schedule.  
* Single Job
  * If a job name is specified it will run the job and print out the pod name
  * Lockers are disabled in this mode

### Deployment Methods

```
apiVersion: v1
kind: Deployment
metadata:
  name: job-runner
spec:
  replicas: 1
  template:
    metadata:
      labels:
        name: job-runner
    spec:
      containers:
      - name: job-runner
        image: sstarcher/job-runner:latest
```


### Runner Kubernetes
  * Set `KUBERNETES_MASTER` to your Kubernetes cluster url example `http://127.0.0.1:8080`


### Lockers
{'fraction_non_alphanumeric': 0.12860808210391275, 'fraction_numerical': 0.007697241821680564, 'mean_word_length': 3.9904, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 18, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3034144', 'n_tokens_mistral': 1101, 'n_tokens_neox': 1015, 'n_words': 274}