{"id":20829789,"url":"https://github.com/pdf/crononag","last_synced_at":"2025-07-22T19:34:04.079Z","repository":{"id":34567792,"uuid":"38513787","full_name":"pdf/crononag","owner":"pdf","description":"super-simple wrapper for commands running from cron","archived":false,"fork":false,"pushed_at":"2017-07-24T02:10:43.000Z","size":10,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-12T08:14:59.134Z","etag":null,"topics":["cron","go","golang"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pdf.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-07-03T23:05:13.000Z","updated_at":"2017-09-16T01:41:29.000Z","dependencies_parsed_at":"2022-09-26T19:34:38.321Z","dependency_job_id":null,"html_url":"https://github.com/pdf/crononag","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/pdf/crononag","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdf%2Fcrononag","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdf%2Fcrononag/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdf%2Fcrononag/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdf%2Fcrononag/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pdf","download_url":"https://codeload.github.com/pdf/crononag/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdf%2Fcrononag/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266561336,"owners_count":23948627,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cron","go","golang"],"created_at":"2024-11-17T23:22:08.318Z","updated_at":"2025-07-22T19:34:04.052Z","avatar_url":"https://github.com/pdf.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# crononag\n\n**crononag** is a **super-simple wrapper for commands running from cron** to\nlimit nagging emails.\n\n## Motivation\n\nThere are a couple of existing cron wrappers around, but I needed to be able to\ncustomize the suppressed exit codes, and optionally always suppress stdout.  I\nalso wanted a simple deploy story.  Existing solutions didn't meet these\ncriteria, so I wrote this.\n\nSince its inception, it has grown some additional useful features, including:\n\n- Suppressing output based on matching regexp, regardless of exit code\n- Forcing output based on matching regexp, regardless of exit code\n- Ability to sleep for a random duration (up to a specified maximum), e.g. to\n  spread load over a time window for jobs that run on multiple hosts\n\n## Usage\n\n```\ncrononag [global options] command [command options] [arguments...]\n```\n\nSimply [download](https://github.com/pdf/crononag/releases/latest)\n`crononag` and either install the package, or put it on your path, then add\n`crononag` in front of the executable in your cron definition and enjoy the\nsilence.  You can remove any output redirections, eg:\n\n```diff\ndiff a/cronjob b/cronjob\n--- a/cronjob\n+++ b/cronjob\n@@ -1,3 +1,3 @@\n PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\n\n-*/10 * * * * root noisycronjob --with args \u003e /dev/null\n+*/10 * * * * root crononag noisycronjob --with args\n```\n\nNow, your job will only produce output in the event of a non-zero exit code.\nSuppressed exit codes may be set using the option below.\n\n### Options\n\nCurrently, `crononag` supports only very simple options:\n\n```\n-E, --suppress-exit-code [-E option -E option]       suppress output for specified exit code(s), may specify multiple times, defaults to 0\n-R, --suppress-regexp [-R option -R option]          suppress output on matching regexp, may specify multiple times\n-O, --omit-stdout                                    omit stdout, even on error, defaults to false\n-f, --force-regexp [-f option -f option]             force output on matching regexp, may specify multiple times, overrides suppression\n-s, --splay \"0\"                                      sleep for a random duration, up to the specified maximum, format is \u003cdecimal\u003e\u003cunit\u003e, eg: \"5s\", \"2h45m\", \"12h\", defaults to 0\n```\n\n## Alternatives\n\nHere are some alternative implementations, in no particular order:\n\n- [shush](http://web.taranis.org/shush/)\n- [cronic](http://habilis.net/cronic/)\n- [cronwrap](https://www.uow.edu.au/~sah/cronwrap.html)\n\n## License\n\nThis project rocks and uses the MIT-LICENSE\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpdf%2Fcrononag","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpdf%2Fcrononag","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpdf%2Fcrononag/lists"}