{"id":27639832,"url":"https://github.com/dbohdan/random-sleep","last_synced_at":"2025-04-23T22:34:42.245Z","repository":{"id":261234647,"uuid":"883692700","full_name":"dbohdan/random-sleep","owner":"dbohdan","description":"Portable POSIX shell script for waiting random amounts of time","archived":false,"fork":false,"pushed_at":"2024-12-20T14:35:51.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-20T15:43:47.985Z","etag":null,"topics":["posix-shell","shell"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/dbohdan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-05T12:12:26.000Z","updated_at":"2024-12-20T14:34:02.000Z","dependencies_parsed_at":"2024-11-05T13:30:44.344Z","dependency_job_id":"03c53ba6-5cf8-4ff7-bf72-d9cd0674861e","html_url":"https://github.com/dbohdan/random-sleep","commit_stats":null,"previous_names":["dbohdan/random-sleep"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbohdan%2Frandom-sleep","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbohdan%2Frandom-sleep/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbohdan%2Frandom-sleep/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbohdan%2Frandom-sleep/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dbohdan","download_url":"https://codeload.github.com/dbohdan/random-sleep/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250528204,"owners_count":21445507,"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","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":["posix-shell","shell"],"created_at":"2025-04-23T22:34:41.568Z","updated_at":"2025-04-23T22:34:42.208Z","avatar_url":"https://github.com/dbohdan.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# random-sleep\n\nA portable POSIX shell script for waiting random amounts of time.\nThis is useful, for example, to prevent your cron jobs from all starting simultaneously, causing the [thundering herd problem](https://en.wikipedia.org/wiki/Thundering_herd_problem).\n\nThe script requires `/dev/urandom` to provide random bytes.\nIt has been tested on Alpine Linux, FreeBSD, macOS, NetBSD, OpenBSD, and Ubuntu.\n\n## Installation\n\nRun the following command in the repository to install `random-sleep` to `/usr/local/bin/` if you have sudo.\n\n```shell\nsudo make install\n```\n\n## Usage\n\n```none\nUsage: random-sleep [-h] [-V] [-v] NUMBER[SUFFIX]\n\nSleep a random whole number of seconds between 0 and NUMBER seconds, minutes,\nor hours (inclusive).\n\nArguments:\n  NUMBER[SUFFIX]\n          The maximum sleep duration. NUMBER must be a non-negative integer.\nThe optional SUFFIX must be 's', 'm', or 'h' when present. The suffix is\ncase-insensitive.\n\nOptions:\n  -h, --help\n          Print this help message and exit.\n\n  -V, --version\n          Print the version number and exit.\n\n  -v, --verbose\n          Print the generated number of seconds to standard error before\nsleeping.\n\nSetting the environment variable 'RANDOM_SLEEP_DEBUG' has the same effect as\nthe option '-v'/'--verbose'.\n```\n\n## License\n\nMIT.\nSee the file [`LICENSE`](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbohdan%2Frandom-sleep","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdbohdan%2Frandom-sleep","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbohdan%2Frandom-sleep/lists"}