{"id":17347536,"url":"https://github.com/cryptiklemur/cron-bundle","last_synced_at":"2025-08-01T21:31:47.847Z","repository":{"id":23639833,"uuid":"27009874","full_name":"cryptiklemur/cron-bundle","owner":"cryptiklemur","description":"Symfony2 Cron Bundle","archived":false,"fork":false,"pushed_at":"2014-11-23T07:25:18.000Z","size":148,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-16T02:09:03.919Z","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":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cryptiklemur.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":"2014-11-22T19:29:29.000Z","updated_at":"2017-10-18T08:29:17.000Z","dependencies_parsed_at":"2022-08-21T07:50:23.805Z","dependency_job_id":null,"html_url":"https://github.com/cryptiklemur/cron-bundle","commit_stats":null,"previous_names":["cryptiklemur/cron-bundle","aequasi/cron-bundle"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cryptiklemur%2Fcron-bundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cryptiklemur%2Fcron-bundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cryptiklemur%2Fcron-bundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cryptiklemur%2Fcron-bundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cryptiklemur","download_url":"https://codeload.github.com/cryptiklemur/cron-bundle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228407838,"owners_count":17915080,"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-10-15T16:49:08.265Z","updated_at":"2024-12-06T03:42:48.702Z","avatar_url":"https://github.com/cryptiklemur.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cron Bundle\n\nThis bundle provides a simple interface for registering repeated scheduled tasks within your application.\n\nThis bundle is tested only against Symfony 2.3, but should work on anything after 2.3, until at least 3.0.\n\n## Installation\n\n1. Add the bundle to your project as a composer dependency:\n\n```shell\n$ composer require aequasi/cron-bundle \"~1.0.0\"\n```\n\n3. Add the bundle to AppKernel:\n\n```php\n// AppKernel.php\npublic function registerBundles()\n{\n\t// ...\n\t$bundles = array(\n\t\t// ...\n        new Aequasi\\Bundle\\CronBundle\\AequasiCronBundle(),\n\t);\n    // ...\n\n    return $bundles;\n}\n```\n\n3. Start using the bundle:\n```shell\n$ app/console cron:scan\n$ app/console cron:run\n```\n\n## Running your cron jobs automatically\n\nThis bundle is designed around the idea that your tasks will be run with a minimum interval - the tasks will be run no more frequently than you schedule them, but they can only run when you trigger then (by running `app/console cron:run`, or the forthcoming web endpoint, for use with webcron services).\n\nTo facilitate this, you can create a cron job on your system like this:\n```\n*/5 * * * * /path/to/symfony/install/app/console cron:run\n```\nThis will schedule your tasks to run at most every 5 minutes - for instance, tasks which are scheduled to run every 3 minutes will only run every 5 minutes.\n\n## Creating your own tasks\n\nCreating your own tasks with CronBundle couldn't be easier - all you have to do is create a normal Symfony2 Command (or ContainerAwareCommand) and tag it with the @CronJob annotation, as demonstrated below:\n\n```php\n/**\n * @CronJob(\"PT1H\")\n */\nclass DemoCommand extends Command\n{\n    // ...\n}\n```\n\nThe interval spec (\"PT1H\" in the above example) is documented on the [DateInterval](http://au.php.net/manual/en/dateinterval.construct.php) documentation page, and can be modified whenever you choose.\nFor your CronJob to be scanned and included in future runs, you must first run `app/console cron:scan` - it will be scheduled to run the next time you run `app/console cron:run`\n\n\n#### If you add a new command, you have to run the scan function for it to get picked up, or clear the symfony cache.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcryptiklemur%2Fcron-bundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcryptiklemur%2Fcron-bundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcryptiklemur%2Fcron-bundle/lists"}