gojobman

A command line job manager with flexible support for retries, timeouts, logging, notifications, and more.

https://github.com/ryancswallace/gojobman

Science Score: 18.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.7%) to scientific vocabulary

Keywords

background-jobs cli command-line golang monitoring-tool nohup process retry supervisor
Last synced: 4 months ago · JSON representation ·

Repository

A command line job manager with flexible support for retries, timeouts, logging, notifications, and more.

Basic Info
Statistics
  • Stars: 1
  • Watchers: 2
  • Forks: 0
  • Open Issues: 1
  • Releases: 0
Topics
background-jobs cli command-line golang monitoring-tool nohup process retry supervisor
Created over 3 years ago · Last pushed over 3 years ago
Metadata Files
Readme Changelog Contributing License Code of conduct Citation Codeowners

README.md

jobman

Jobman automates the process of running and monitoring jobs on the command line. Jobman supports * running commands in the background immune to hangups * retrying commands * aborting commands after a timeout period * logging command output * sending notifications on command success or failure * delaying command execution for a specified time or event

Build Status codecov Go Report Card Docs site GoDoc

Documentation

Visit the :book: jobman documentation site :book: for complete information on using jobman.

For package implementation details, see the jobman page in the Go reference.

Example

The example below uses jobman to run a Python script train.py in the background and immune to hangups (e.g., a SIGHUP from an SHH timeout).

Jobman will ensure 60 seconds have passed and that the file data.csv exists before starting the program. If those conditions haven't been met by 5:00PM on March 5, 2032, jobman will abort the job.

Jobman will retry the program up to five times until there's one successful run, defined as an exit code of 0 or 42, waiting ten seconds between retries.

If the job succeeds, jobman will send a notification email. If the job fails, jobman will send an SMS message. bash jobman \ -wait.timedelta 60s -wait.file data.csv -wait.abort-datetime "2032-03-05T17:00:00" \ -retries.num-successes 1 -retries.num-runs 5 -retries.success-codes 0,42 -retries.delay 10s \ -notify.on-success my-email -notify.on-failure my-cell \ train.py

After submitting the train.py job above, use jobman show to display details on job progress: bash jobman show train.py

To view a running log of the consolidated stdout and stderr streams of the latest run of the train.py job, use jobman logs: bash jobman logs train.py -follow

Installation

There are multiple ways to install jobman. The recommended method is to use the RPM, deb, or apk package, if applicable, or a precompiled binary otherwise.

Package manager packages

Jobman is available via RPM, deb, and apk packages as jobman_<version>-_linux_(amd64|386).(rpm|deb|apk). Download packages for the latest jobman version from the latest releases page on the GitHub repository.

Precompiled binaries

Precompiled binaries are available for Linux, MacOS, and Windows as jobman_(Linux|Darwin|Windows)_<(x86_64|i386)>.tar.gz. Download binaries for the latest jobman version from the latest releases page on the GitHub repository.

Docker image

Use docker run to pull and run the latest jobman Docker image from Docker Hub: bash docker run -it jobman

To build the Docker image locally instead of pulling from Docker Hub, use the docker-image make target: bash make docker-image

Build from source

Building jobman from source code requires Go version 1.15 or greater.

Start by cloning the repository: bash git clone https://github.com/ryancswallace/jobman.git cd jobman

Then build and install the jobman binary under your GOPATH using make: bash make install

The Makefile provides several other targets for convenience while developing, including: * format: formats the source code * test: runs the jobman test suite, including unit tests, end-to-end tests, performance tests, and linters * build: builds the jobman binary for the current platform

Alternatives

Jobman aims to be reliable and fully-featured. It operates without requiring a system service/daemon for orchestration.

cron Airflow/prefect/dagster supervisord https://github.com/kadwanev/retry https://github.com/linyows/go-retry https://github.com/martinezdelariva/retry

Contributing

Feature requests, bug reports, and pull requests are welcome! See CONTRIBUTING.md for details on how to contribute to jobman.

Owner

  • Name: Ryan Wallace
  • Login: ryancswallace
  • Kind: user
  • Location: Boston, MA

Data Science @ FRBB | CS @ Harvard

Citation (CITATION.ccf)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Wallace"
  given-names: "Ryan"
title: "jobman"
date-released: 2022-08-29
url: "https://github.com/ryancswallace/jobman"

GitHub Events

Total
Last Year

Committers

Last synced: 8 months ago

All Time
  • Total Commits: 94
  • Total Committers: 1
  • Avg Commits per committer: 94.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Ryan Wallace r****e@g****m 94

Issues and Pull Requests

Last synced: 8 months ago

All Time
  • Total issues: 1
  • Total pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: 3 minutes
  • Total issue authors: 1
  • Total pull request authors: 1
  • Average comments per issue: 0.0
  • Average comments per pull request: 1.0
  • Merged pull requests: 1
  • Bot issues: 1
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • github-actions[bot] (1)
Pull Request Authors
  • ryancswallace (1)
Top Labels
Issue Labels
semantic-release (1)
Pull Request Labels

Dependencies

go.mod go
  • github.com/mitchellh/go-homedir v1.1.0
  • github.com/spf13/cobra v1.5.0
  • github.com/spf13/cobra-cli v1.3.0
  • github.com/spf13/viper v1.12.0
go.sum go
  • 889 dependencies