{"id":22711223,"url":"https://github.com/yiicod/yii2-cron","last_synced_at":"2025-04-13T15:12:57.816Z","repository":{"id":35070575,"uuid":"39216422","full_name":"yiicod/yii2-cron","owner":"yiicod","description":null,"archived":false,"fork":false,"pushed_at":"2018-02-18T21:24:44.000Z","size":11,"stargazers_count":7,"open_issues_count":1,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T06:12:02.592Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"thoughtbot/dotfiles","license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yiicod.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-07-16T19:33:40.000Z","updated_at":"2021-03-14T14:53:28.000Z","dependencies_parsed_at":"2022-09-16T10:50:30.948Z","dependency_job_id":null,"html_url":"https://github.com/yiicod/yii2-cron","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yiicod%2Fyii2-cron","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yiicod%2Fyii2-cron/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yiicod%2Fyii2-cron/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yiicod%2Fyii2-cron/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yiicod","download_url":"https://codeload.github.com/yiicod/yii2-cron/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248345258,"owners_count":21088231,"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-12-10T12:15:00.337Z","updated_at":"2025-04-13T15:12:57.777Z","avatar_url":"https://github.com/yiicod.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Yii Cron extension\n==================\n\n[![Latest Stable Version](https://poser.pugx.org/yiicod/yii2-cron/v/stable)](https://packagist.org/packages/yiicod/yii2-cron) [![Total Downloads](https://poser.pugx.org/yiicod/yii2-cron/downloads)](https://packagist.org/packages/yiicod/yii2-cron) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/yiicod/yii2-cron/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/yiicod/yii2-cron/?branch=master)[![Code Climate](https://codeclimate.com/github/yiicod/yii2-cron/badges/gpa.svg)](https://codeclimate.com/github/yiicod/yii2-cron)\n\nProvide a logic and functionality to block console commands until they execute. \nUnlocks commands exhibited at the expiration of the block if the server is down.\n\n#### Usage\n```php\npublic function behaviors()\n{\n    return array(\n        'LockUnLockBehavior' =\u003e array(\n            'class' =\u003e 'yiicod\\cron\\commands\\behaviors\\LockUnLockBehavior',\n            'timeLock' =\u003e 0 //Set time lock duration for command in seconds\n        )\n    );\n}\n```\n\nAny command can be converted to daemon\n```php\nclass AwesomeCommand extends DaemonController\n{\n    /**\n     * Daemon name\n     *\n     * @return string\n     */\n    protected function daemonName(): string\n    {\n        return 'mail-queue';\n    }\n\n    /**\n     * Run send mail\n     */\n    public function worker()\n    {\n        // Some logic that will be repeateble \n    }\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyiicod%2Fyii2-cron","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyiicod%2Fyii2-cron","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyiicod%2Fyii2-cron/lists"}