{"id":15953139,"url":"https://github.com/pugnascotia/mantra","last_synced_at":"2025-03-17T23:32:53.915Z","repository":{"id":57580566,"uuid":"64223358","full_name":"pugnascotia/mantra","owner":"pugnascotia","description":"A simple cron-like scheduler for a single command","archived":false,"fork":false,"pushed_at":"2016-07-28T14:43:51.000Z","size":15,"stargazers_count":24,"open_issues_count":2,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-08T13:11:00.922Z","etag":null,"topics":["cron","docker","schedule"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pugnascotia.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}},"created_at":"2016-07-26T13:27:54.000Z","updated_at":"2023-11-13T17:30:53.000Z","dependencies_parsed_at":"2022-09-26T17:50:45.540Z","dependency_job_id":null,"html_url":"https://github.com/pugnascotia/mantra","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pugnascotia%2Fmantra","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pugnascotia%2Fmantra/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pugnascotia%2Fmantra/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pugnascotia%2Fmantra/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pugnascotia","download_url":"https://codeload.github.com/pugnascotia/mantra/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221703475,"owners_count":16866544,"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":["cron","docker","schedule"],"created_at":"2024-10-07T13:10:58.299Z","updated_at":"2024-10-27T16:19:26.026Z","avatar_url":"https://github.com/pugnascotia.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mantra\n\nA simple cron-like scheduler for a single command\n\n## Motivation\n\nRunning a process in a Docker container on a fixed schedule is fiddly. Most solutions seem to involve installing `cron`, then installing a `crontab` and tailing `cron`'s output. Yuck.\n\n`mantra` is more like [`at`](https://en.wikipedia.org/wiki/At_(Unix)), in that it allows you to specify the schedule as an argument in a `cron` format, along with the executable name and any arguments. It will then run that command, and only that command, on the schedule provided. STDOUT and STDERR are shared, making it easier to capture the program output.\n\n## Usage\n\nExecute `my_prog` with some arguments at 1am every day:\n\n```\nmantra \"0 1 * * * *\" my_prog arg1 arg2\n```\n\n## In Docker\n\nIn your `Dockerfile`, download the latest binary, for example:\n\n```\nRUN curl -o /usr/local/bin/mantra -L https://github.com/pugnascotia/mantra/releases/download/0.0.1/mantra \u0026\u0026 \\\n    chmod +x /usr/local/bin/mantra\n```\n\nThen call it:\n\n```\nCMD mantra schedule my_prog arg1 arg2 ...\n```\n\n## See Also\n\nUses a [slightly modified](https://github.com/pugnascotia/cron) version of the excellent [robfig/cron](https://github.com/robfig/cron) package.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpugnascotia%2Fmantra","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpugnascotia%2Fmantra","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpugnascotia%2Fmantra/lists"}