{"id":14969231,"url":"https://github.com/beliven-it/fastify-crons","last_synced_at":"2026-01-26T02:35:05.802Z","repository":{"id":42717189,"uuid":"271570359","full_name":"beliven-it/fastify-crons","owner":"beliven-it","description":"A plugin to schedule cron jobs","archived":false,"fork":false,"pushed_at":"2023-01-07T20:57:22.000Z","size":913,"stargazers_count":0,"open_issues_count":3,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-31T12:06:23.138Z","etag":null,"topics":["cron","fastify","jobs","js","node-cron","nodejs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/beliven-it.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":"2020-06-11T14:39:21.000Z","updated_at":"2021-10-22T09:37:05.000Z","dependencies_parsed_at":"2023-02-08T01:46:58.583Z","dependency_job_id":null,"html_url":"https://github.com/beliven-it/fastify-crons","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beliven-it%2Ffastify-crons","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beliven-it%2Ffastify-crons/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beliven-it%2Ffastify-crons/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beliven-it%2Ffastify-crons/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/beliven-it","download_url":"https://codeload.github.com/beliven-it/fastify-crons/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239885512,"owners_count":19713320,"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":["cron","fastify","jobs","js","node-cron","nodejs"],"created_at":"2024-09-24T13:41:24.178Z","updated_at":"2026-01-26T02:35:00.779Z","avatar_url":"https://github.com/beliven-it.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fastify-crons\n\nA plugin to schedule cron jobs\n\nhttps://en.wikipedia.org/wiki/Cron\n\n![Node.js CI](https://github.com/heply/fastify-crons/workflows/Node.js%20CI/badge.svg)\n\n## Install\n\n```bash\n$ npm i --save fastify-crons\n```\n\n## Usage\n\n```js\nfastify.register(require('fastify-crons'), {\n  timezone: 'Europe/Rome'\n})\n\nfastify.crons.schedule('*/2 * * * *', () =\u003e {\n  console.log('Hi!')\n})\n\n// OR:\n\nconst task = fastify.crons.schedule('*/2 * * * *', () =\u003e {\n  console.log('Hi!')\n}, {\n  scheduled: false\n})\n\ntask.start()\n```\n\nUnder the hood, [node-cron](https://www.npmjs.com/package/node-cron#options) is used.\n\n## Options\n\n| Name        | Description                                                                                 |\n|-------------|---------------------------------------------------------------------------------------------|\n| `timezone`  | Can be used to set the global reference timezone for all scheduled jobs. By default is UTC. |\n\n## Test\n\n```bash\n$ npm test\n```\n\n## Acknowledgements\n\nThis project is kindly sponsored by:\n\n[![Beliven](https://assets.beliven.com/brand/logo_pos_color.svg)](https://www.beliven.com)\n\n## License\n\nLicensed under [MIT](./LICENSE)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeliven-it%2Ffastify-crons","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeliven-it%2Ffastify-crons","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeliven-it%2Ffastify-crons/lists"}