{"id":19714009,"url":"https://github.com/grails/grails-quartz","last_synced_at":"2025-03-12T21:15:55.688Z","repository":{"id":137156086,"uuid":"4429959","full_name":"grails/grails-quartz","owner":"grails","description":"This project provides integration of the Quartz scheduling framework into the Grails Framework","archived":false,"fork":false,"pushed_at":"2025-01-10T06:36:51.000Z","size":12613,"stargazers_count":77,"open_issues_count":28,"forks_count":93,"subscribers_count":25,"default_branch":"4.0.x","last_synced_at":"2025-03-08T12:24:55.473Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://grails.org/plugin/quartz","language":"Groovy","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/grails.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":"2012-05-24T07:23:50.000Z","updated_at":"2025-01-10T06:36:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"9209ff44-d4f8-4a24-b3db-ee931a71f2a2","html_url":"https://github.com/grails/grails-quartz","commit_stats":{"total_commits":446,"total_committers":58,"mean_commits":7.689655172413793,"dds":0.7197309417040358,"last_synced_commit":"8c7a021d8ca02c776bc93f96d186909fa63ae1ea"},"previous_names":["grails/grails-quartz","grails-plugins/grails-quartz"],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grails%2Fgrails-quartz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grails%2Fgrails-quartz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grails%2Fgrails-quartz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grails%2Fgrails-quartz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/grails","download_url":"https://codeload.github.com/grails/grails-quartz/tar.gz/refs/heads/4.0.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243268615,"owners_count":20263897,"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-11T22:28:07.650Z","updated_at":"2025-03-12T21:15:55.668Z","avatar_url":"https://github.com/grails.png","language":"Groovy","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Grails Quartz Plugin\n\n[![Maven Central](https://img.shields.io/maven-central/v/org.grails.plugins/quartz.svg?label=Maven%20Central)](https://central.sonatype.com/artifact/org.grails.plugins/quartz)\n[![Java CI](https://github.com/grails/grails-quartz/actions/workflows/gradle.yml/badge.svg?event=push)](https://github.com/grails/grails-quartz/actions/workflows/gradle.yml)\n\n## Documentation\n\n[Latest documentation](https://grails.github.io/grails-quartz/latest/) and [snapshots](https://grails.github.io/grails-quartz/snapshot/) are available.\n\n## Branches\n\n| Branch | Grails Version |\n|--------|----------------|\n| 1.x    | 2              |\n| 2.0.x  | 3-5            |\n| 3.0.x  | 6              |\n| 4.0.x  | 7              |\n\n## Using\n### Quick start\nTo start using Quartz plugin just simply add\n`implementation 'org.grails.plugins:quartz:{version}'` in your `build.gradle`.\n\n\u003e[!NOTE]\n\u003e __2.0.13 for Grails 3.3.*__\\\n\u003e Properties changed to `static` from `def`.\\\n\u003e For example: `def concurrent` will be now `static concurrent`.\n\n### Scheduling Jobs\nTo create a new job run the `grails create-job` command and enter the name of the job. Grails will create a new job and place it in the `grails-app/jobs` directory:\n```groovy\npackage com.mycompany.myapp\n\nclass MyJob {\n\n    static triggers = {\n        simple repeatInterval: 1000\n    }\n\n    void execute() {\n        print \"Job run!\"\n    }\n}\n```\n\nThe above example will call the `execute()` method every second.\n\n### Scheduling configuration syntax\n\nCurrently, plugin supports three types of [triggers](http://www.quartz-scheduler.org/documentation/quartz-2.3.0/tutorials/tutorial-lesson-02.html):\n* **simple trigger** — executes once per defined interval (ex. \"every 10 seconds\");\n* **cron trigger** — executes job with cron expression (ex. \"at 8:00 am every Monday through Friday\");\n* **custom trigger** — your implementation of [Trigger](http://www.quartz-scheduler.org/api/2.3.0/org/quartz/Trigger.html) interface.\n\nMultiple triggers per job are allowed.\n```groovy\nclass MyJob {\n\n    static triggers = {\n        simple name: 'simpleTrigger', startDelay: 10000, repeatInterval: 30000, repeatCount: 10\n        cron name: 'cronTrigger', startDelay: 10000, cronExpression: '0/6 * 15 * * ?'\n        custom name: 'customTrigger', triggerClass: MyTriggerClass, myParam: myValue, myAnotherParam: myAnotherValue\n    }\n\n    void execute() {\n        println \"Job run!\"\n    }\n}\n```\n\nWith this configuration, job will be executed 11 times with 30 seconds interval with first run in 10 seconds after scheduler startup (simple trigger), also it'll be executed each 6 second during 15th hour (15:00:00, 15:00:06, 15:00:12, ... — this configured by cron trigger) and also it'll be executed each time your custom trigger will fire.\n\nThree kinds of triggers are supported with the following parameters. The name field must be unique:\n* `simple`:\n  * `name` — the name that identifies the trigger;\n  * `startDelay` — delay (in milliseconds) between scheduler startup and first job's execution;\n  * `repeatInterval` — timeout (in milliseconds) between consecutive job's executions;\n  * `repeatCount` — trigger will fire job execution `(1 + repeatCount)` times and stop after that (specify `0`  here to have one-shot job or `-1` to repeat job executions indefinitely);\n* `cron`:\n  * `name` — the name that identifies the trigger;\n  * `startDelay` — delay (in milliseconds) between scheduler startup and first job's execution;\n  * `cronExpression` — [cron expression](http://www.quartz-scheduler.org/api/2.2.0/org/quartz/CronExpression.html)\n* `custom`:\n  * `triggerClass`  — your class which implements [CalendarIntervalTriggerImpl](http://www.quartz-scheduler.org/api/2.3.0/org/quartz/impl/triggers/CalendarIntervalTriggerImpl.html) impl;\n  * any params needed by your trigger.\n\n### Configuration plugin syntax\n\nYou can add the following properties to control persistence or not persistence:\n* `quartz.pluginEnabled` - defaults to `true`, can disable plugin for test cases etc\n* `quartz.jdbcStore` - `true` to enable database store, `false` to use RamStore (default: `true`)\n* `quartz.autoStartup` - delays jobs until after bootstrap startup phase (default: `false`)\n* `quartz.jdbcStoreDataSource` - jdbc data source alternate name\n* `quartz.waitForJobsToCompleteOnShutdown` - wait for jobs to complete on shutdown (default: `true`)\n* `quartz.exposeSchedulerInRepository` - expose Schedule in repository\n* `quartz.scheduler.instanceName` - name of the scheduler to avoid conflicts between apps\n* `quartz.purgeQuartzTablesOnStartup` - when jdbcStore set to `true` and this is `true`, clears out all quartz tables on startup\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrails%2Fgrails-quartz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrails%2Fgrails-quartz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrails%2Fgrails-quartz/lists"}