{"id":19961220,"url":"https://github.com/formapro/crony","last_synced_at":"2025-12-31T14:15:43.011Z","repository":{"id":66342995,"uuid":"179859739","full_name":"formapro/crony","owner":"formapro","description":"Lightweight cron replacement that calls URL.","archived":false,"fork":false,"pushed_at":"2019-04-29T17:31:08.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-01T16:47:31.741Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/formapro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2019-04-06T16:41:43.000Z","updated_at":"2019-04-29T17:31:10.000Z","dependencies_parsed_at":"2023-03-10T23:52:49.230Z","dependency_job_id":null,"html_url":"https://github.com/formapro/crony","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/formapro/crony","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/formapro%2Fcrony","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/formapro%2Fcrony/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/formapro%2Fcrony/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/formapro%2Fcrony/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/formapro","download_url":"https://codeload.github.com/formapro/crony/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/formapro%2Fcrony/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265866108,"owners_count":23840936,"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":[],"created_at":"2024-11-13T02:06:47.546Z","updated_at":"2025-12-31T14:15:42.980Z","avatar_url":"https://github.com/formapro.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Crony\n\nLightweight cron replacement that calls URL\n\n## Usage\n\nConfig\n\n```json\n{\n  \"tasks\": [\n    {\n      \"cron\": \"@every 1m\",\n      \"url\": \"http://app/task\"\n    }\n  ]\n}\n\n```  \n\nDocker\n\n \n```yaml\nservices:\n  app:\n    \n  cron:\n    image: 'formapro/crony:latest'\n    depends_on:\n      - app\n    volumes:\n      - './crony.json:/app/crony.json'\n```\n\nSymfony\n\nRoute:\n\n```yaml\n#config/routes.yaml\n\ncron_task:\n  path: '/cron/task/foo'\n  controller: 'App\\Controller\\CronTaskController::foo'\n  methods: [POST]\n```\n\nController:\n\n```php\n\u003c?php declare(strict_types=1);\n\nnamespace App\\Controller;\n\nuse Symfony\\Component\\EventDispatcher\\EventSubscriberInterface;\nuse Symfony\\Component\\HttpFoundation\\Request;\nuse Symfony\\Component\\HttpFoundation\\Response;\nuse Symfony\\Component\\HttpKernel\\Event\\PostResponseEvent;\nuse Symfony\\Component\\HttpKernel\\KernelEvents;\n\nclass CronTaskController implements EventSubscriberInterface\n{\n    public function foo(Request $request): Response\n    {\n        $request-\u003eattributes-\u003eset('task', 'foo');\n\n        return new Response();\n    }\n\n    public function onTerminate(PostResponseEvent $event): void\n    {\n        if ('foo' !== $event-\u003egetRequest()-\u003eattributes-\u003eget('task')) {\n            return;\n        }\n\n        // do task\n    }\n\n    public static function getSubscribedEvents(): array\n    {\n        return [\n            KernelEvents::TERMINATE =\u003e 'onTerminate',\n        ];\n    }\n}\n```\n\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fformapro%2Fcrony","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fformapro%2Fcrony","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fformapro%2Fcrony/lists"}