All Projects → docwhat → chronic

docwhat / chronic

Licence: MIT License
A tool that hides output unless the command fails; now in Go!

Programming Languages

shell
77523 projects
go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to chronic

server-next
😎 The next generation of RESTful API service and more for Mix Space, powered by @nestjs.
Stars: ✭ 43 (+126.32%)
Mutual labels:  cron
arask
Automatic RAils taSKs.
Stars: ✭ 31 (+63.16%)
Mutual labels:  cron
mi-cron
📆 A microscopic parser for standard cron expressions.
Stars: ✭ 16 (-15.79%)
Mutual labels:  cron
mautic-cron-commands
Script to run Mautic commands from a web page.
Stars: ✭ 32 (+68.42%)
Mutual labels:  cron
php-mvc
PHP MVC ⦿ Dockerized • Composer • RESTful API • Memcached • cron • WebSocket
Stars: ✭ 17 (-10.53%)
Mutual labels:  cron
emsm
A lightweight, easy to extend minecraft server manager.
Stars: ✭ 72 (+278.95%)
Mutual labels:  cron
gh-action-data-scraping
this shows how to use github actions to do periodic data scraping
Stars: ✭ 147 (+673.68%)
Mutual labels:  cron
lambda-cron
LambdaCron - serverless cron tool
Stars: ✭ 22 (+15.79%)
Mutual labels:  cron
asparagus
An easy to use task scheduler for distributed systems
Stars: ✭ 14 (-26.32%)
Mutual labels:  cron
discord.emojis
hourly cron scraping emojis table from discord client
Stars: ✭ 17 (-10.53%)
Mutual labels:  cron
adsorber
Ad-blocker for Linux systems purely built on POSIX-compliant shell scripts.
Stars: ✭ 57 (+200%)
Mutual labels:  cron
scheduler
Task Scheduler for Laravel applications. UI from scratch
Stars: ✭ 18 (-5.26%)
Mutual labels:  cron
kitsu-season-trends
🦊 Kitsu seasonal anime trends
Stars: ✭ 13 (-31.58%)
Mutual labels:  cron
kaabah
A Terraform solution to design, build and operate Docker Swarm infrastructures
Stars: ✭ 29 (+52.63%)
Mutual labels:  cron
reports
UI for created and download reports in Laravel
Stars: ✭ 13 (-31.58%)
Mutual labels:  cron
job-plus
Job Plus项目是基于SpringBoot+Vue的轻量级定时任务管理系统
Stars: ✭ 17 (-10.53%)
Mutual labels:  cron
cron-command
Tests, runs, and deletes WP-Cron events; manages WP-Cron schedules.
Stars: ✭ 23 (+21.05%)
Mutual labels:  cron
cronitor-cli
Command line tools for Cronitor.io
Stars: ✭ 31 (+63.16%)
Mutual labels:  cron
clockwork
A scheduler process to replace cron.
Stars: ✭ 472 (+2384.21%)
Mutual labels:  cron
wheeltimer
crontab, golang crontab, wheeltimer
Stars: ✭ 13 (-31.58%)
Mutual labels:  cron

Chronic

A tool to hide stdout and stderr when a program runs successfully (i.e., returns exit code 0).

GitHub Actions GitHub release Go Report Card GitHub issues

About

This is a go based version of the classic cronic or chronic tool. Chuck Houpt wrote the original chronic.

Usage

If you've ever used cron to run jobs, you know that it sends an email for any output generated by the command. This is why you see crontabs that look like this:

[email protected]
PATH=/usr/bin:/bin
0 4 0 0 0 my-noisy-command -vF >/dev/null 2>&1

This is an anti-pattern:

  • If you failed to get the command line correct, then you'll end up getting an email.
  • If anything goes wrong, you've lost the output.
  • If you log to a file, then you have to rotate that log, even if 99% of the contents are useless.

With chronic you don't have to worry about that anymore!

[email protected]
PATH=/usr/bin:/bin
0 4 0 0 0 chronic my-noisy-command -vF

Now, you'll get no emails unless my-noisy-command returns a non-zero exit code. If it does return a non-zero exit code, then you'll get an email that looks like this:

To: [email protected]
Subject: [CRON] chronic my-noisy-command -vF

**** command ****
[`bash` `-c` `echo "boo"; echo "emergency" 1>&2; exit 10`]

**** stdout ****
stdout: Normal output from the noisy command.
stdout: Starting messages
stdout: Normal stuff

**** stderr ****
stderr: Standard error output from the noisy command.
stderr:
stderr: [FATAL] Something went wrong!

Exited with 10

Installation

Download binaries

Homebrew

brew install docwhat/tap/chronic

GitHub Releases

The latest release is available on github.com/docwhat/chronic/releases. You can download the binary for your architecture and OS there.

Source

go get docwhat.org/chronic

Compile it yourself

You'll need to install a recent version of Go and set it up. You can check the .travis.yml file to see what version of go I'm using.

go get -u docwhat.org/chronic

Developers

I love contributions! Read CONTRIBUTING.md!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].