{"id":28484344,"url":"https://github.com/bitflower/feathers-agenda","last_synced_at":"2026-05-05T18:37:42.232Z","repository":{"id":57233995,"uuid":"450871261","full_name":"bitflower/feathers-agenda","owner":"bitflower","description":"A feathers.js service adapter for Agenda.js written in Typescript.","archived":false,"fork":false,"pushed_at":"2023-07-14T14:57:09.000Z","size":778,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-17T00:55:47.565Z","etag":null,"topics":["agendajs","expressjs","feathersjs","job-scheduler","nodejs","scheduler","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/bitflower.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":"2022-01-22T16:25:16.000Z","updated_at":"2023-07-06T22:06:36.000Z","dependencies_parsed_at":"2022-09-03T06:51:41.942Z","dependency_job_id":null,"html_url":"https://github.com/bitflower/feathers-agenda","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/bitflower/feathers-agenda","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitflower%2Ffeathers-agenda","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitflower%2Ffeathers-agenda/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitflower%2Ffeathers-agenda/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitflower%2Ffeathers-agenda/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bitflower","download_url":"https://codeload.github.com/bitflower/feathers-agenda/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitflower%2Ffeathers-agenda/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261006184,"owners_count":23095999,"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":["agendajs","expressjs","feathersjs","job-scheduler","nodejs","scheduler","typescript"],"created_at":"2025-06-07T22:06:46.725Z","updated_at":"2025-10-16T15:13:12.413Z","avatar_url":"https://github.com/bitflower.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# feathers-agenda\n\nA [feathers.js](https://feathersjs.com/) service adapter for [agendajs](http://agendajs.com/) written in Typescript.\n\n[![npm](https://img.shields.io/npm/v/feathers-agenda)](https://www.npmjs.com/package/feathers-agenda)\n[![libraries.io](https://img.shields.io/librariesio/release/npm/feathers-agenda)](https://libraries.io/npm/feathers-agenda)\n[![npm](https://img.shields.io/npm/dm/feathers-agenda)](https://www.npmjs.com/package/feathers-agenda)\n[![GitHub license](https://img.shields.io/github/license/bitflower/feathers-agenda)](https://github.com/bitflower/feathers-agenda/blob/master/LICENSE)\n\n## Installation\n\n```bash\nnpm i feathers-agenda\n```\n\nAlso see:\n\n- https://feathersjs.com/\n- https://github.com/agenda/agenda\n\n## Supported features\n\n- [x] `Agenda` instaniation, interaction \u0026 configuration\n  - [x] [instaniation](https://github.com/agenda/agenda#example-usage) -\u003e `constructor` initializes an instance and stores it on the service instance\n  - [x] configuration -\u003e `new AgendaService()` or `app.configure()`\n  - [x] interaction -\u003e `getAgenda` method\n  - [x] [custom job processors](https://github.com/agenda/agenda#defining-job-processors) -\u003e `AgendaJobDefinition` can be provided during setup\n- [x] Support different scheduling types:\n  - [x] `every()` / `repeatEvery()`\n\n## In progress\n\n- [ ] Implement out-of-the-box job processor `ServiceCall` for easily scheduling Feathers service calls\n\n## Todo (contributions welcome)\n\n- [ ] Tests\n- [ ] List jobs\n- [ ] Delete jobs\n- [ ] Canceling, disabling and enabling jobs\n- [ ] [schedule job type](https://github.com/agenda/agenda#schedulewhen-name-data) -\u003e support different scheduling types\n- [ ] [now job type](https://github.com/agenda/agenda#nowname-data) -\u003e support different scheduling types\n- [ ] handle `SIGTERM` properly to avoid dead agenda record (e.g. `lockedAt` is set instead of `undefined`)\n- [ ] [Interact with events](https://github.com/agenda/agenda#agenda-events)\n- [ ] Update to latest `@feathers/feathers`\n- [ ] Mixin API to comfortably scheduling service calls from within the code base\n\n## Usage\n\nFor a quick start no further configuration is required. The library will pick the MongoDB url from the Feathers `config.mongodb` property.\n\n### With `app.use()`\n\n```typescript\nimport { AgendaService } from 'feathers-agenda';\n\napp.use(\"/agendas\", new AgendaService({\n  // options\n}))\n\napp.service(\"agendas\").create({\n  name : 'ServiceCall',\n  interval : '*/20 * * * * *', // Every 20 seconds\n  data: {\n    service: '',\n    method: 'get',\n    data: {\n      // The data you want to pass into the job\n      // An `_id` for a `get` call or an object for `create` or other methods\n    },\n    params: {\n      // Any Feathers `params` you want to pass in\n    }\n  }\n})\n\n```\n\n### With `app.configure()`\n\n```typescript\nimport { setup } from 'feathers-agenda';\n\napp.configure(setup);\n\napp.service(\"agendas\").create({\n  name : 'ServiceCall',\n  interval : '*/20 * * * * *', // Every 20 seconds\n  data: {\n    service: '',\n    method: 'get',\n    data: {\n      // The data you want to pass into the job\n      // An `_id` for a `get` call or an object for `create` or other methods\n    },\n    params: {\n      // Any Feathers `params` you want to pass in\n    }\n  }\n})\n\n```\n\n### Custom job definition example\n\n```typescript\nimport { FeathersAgendaOptions, setup } from 'feathers-agenda';\n\n// Define the name and the code of a job you want to run periodically / in a scheduled way\napp.configure((app) =\u003e {\n  const customConfigAndJobs: FeathersAgendaOptions = {\n    jobDefinitions: [\n      {\n        name: 'MyJob',\n        callback: async (job: any) =\u003e {\n\n          // Do anything you want here (like service calls, business logic, etc)\n          const { attrs: { _id } } = job;\n          const record = await app\n            .service('email-sending-service')\n            .post(_id);\n        }\n      }\n    ]\n  };\n  setup(app, customConfigAndJobs);\n});\n\n// Actually schedule the job\napp.service(\"agendas\").create({\n  name : 'MyJob',\n  interval : '*/20 * * * * *', // Every 20 seconds\n  data: {\n    _id: '61e5a5bb06c4d94ddc9cb531'\n  }\n})\n\n```\n\n## Testing\n\nSimply run `npm test` and all your tests in the `test/` directory will be run. It has full support for *Visual Studio Code*. You can use the debugger to set breakpoints.\n\n## License\n\nLicensed under the [MIT license](LICENSE).\n\n## Inspiration\n\nOriginal feathers service template was [feathers-messagebird](https://github.com/fratzinger/feathers-messagebird) by Frederik Schmatz.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitflower%2Ffeathers-agenda","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbitflower%2Ffeathers-agenda","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitflower%2Ffeathers-agenda/lists"}