{"id":15764070,"url":"https://github.com/mikaello/rescript-node-cron","last_synced_at":"2025-05-07T13:03:00.583Z","repository":{"id":38464901,"uuid":"195186242","full_name":"mikaello/rescript-node-cron","owner":"mikaello","description":"Bindings for node-cron (cron for NodeJS)","archived":false,"fork":false,"pushed_at":"2025-04-14T23:02:48.000Z","size":340,"stargazers_count":4,"open_issues_count":13,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-15T00:20:11.100Z","etag":null,"topics":["cron","rescript","rescript-bindings"],"latest_commit_sha":null,"homepage":"https://mikaello.github.io/rescript-node-cron/","language":"ReScript","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/mikaello.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,"zenodo":null}},"created_at":"2019-07-04T06:57:37.000Z","updated_at":"2025-02-20T11:39:41.000Z","dependencies_parsed_at":"2024-12-10T02:25:43.337Z","dependency_job_id":"b1f5038b-ebf3-4786-b719-9b458ee1d642","html_url":"https://github.com/mikaello/rescript-node-cron","commit_stats":{"total_commits":68,"total_committers":7,"mean_commits":9.714285714285714,"dds":0.2941176470588235,"last_synced_commit":"05b6e6965c43fe843b9e79d001c154122f70dd31"},"previous_names":["mikaello/bs-node-cron"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikaello%2Frescript-node-cron","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikaello%2Frescript-node-cron/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikaello%2Frescript-node-cron/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikaello%2Frescript-node-cron/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mikaello","download_url":"https://codeload.github.com/mikaello/rescript-node-cron/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252577008,"owners_count":21770721,"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","rescript","rescript-bindings"],"created_at":"2024-10-04T12:01:19.535Z","updated_at":"2025-05-07T13:03:00.534Z","avatar_url":"https://github.com/mikaello.png","language":"ReScript","readme":"# rescript-cron\n\n[![NPM version](http://img.shields.io/npm/v/rescript-cron.svg)](https://www.npmjs.org/package/rescript-cron)\n[![Build Status](https://travis-ci.org/mikaello/rescript-node-cron.svg?branch=master)](https://travis-ci.org/mikaello/rescript-node-cron)\n\nBindings for [node-cron](https://github.com/kelektiv/node-cron), a tool that\nallows you to execute _something_ on a schedule. This is typically done using\nthe cron syntax:\n\n```\n*    *    *    *    *    *\n┬    ┬    ┬    ┬    ┬    ┬\n│    │    │    │    │    │\n│    │    │    │    │    └ day of week (0 - 6, or sun - sat), 0 is Sunday\n│    │    │    │    └───── month (0 - 11, or jan - dec)\n│    │    │    └────────── day of month (1 - 31)\n│    │    └─────────────── hour (0 - 23)\n│    └──────────────────── minute (0 - 59)\n└───────────────────────── second (0 - 59, OPTIONAL)\n```\n\nLearn more about the syntax at [crontab.guru](https://crontab.guru/) (NB it does\nnot have the seconds parameter and months start at 1 (this lib has 0-indexed\nmonths)).\n\n## Getting started\n\n```\nyarn add rescript-cron\n```\n\nThen add `rescript-cron` as a dependency to `bsconfig.json`:\n\n```diff\n\"bs-dependencies\": [\n+  \"rescript-cron\"\n]\n```\n\n## Example\n\n```reason\nopen RescriptCron\n\n// Make a job that will fire every second when started\nlet job =\n  CronJob.make(\n    `CronString(\"* * * * * *\"),\n    _ =\u003e Js.log(\"Just doing my job\"),\n    (),\n  );\n\n// Firing every second, printing 'Just doing my job'\nstart(job);\n\nlet time =\n  CronTime.make(`JsDate(Js.Date.fromString(\"2021-04-11T10:20:30Z\")), ());\n\n// setTime will stop the current job, and change when it will fire next\nsetTime(job, time);\n\n// It will now fire once in april 2021\nstart(job);\n```\n\n[The tests](https://github.com/mikaello/rescript-node-cron/tree/master/__tests__)\nhave more examples of how to use these bindings.\n\n## Contribute\n\n- If you find bugs or want to improve this library, feel free to open an issue\n  or PR.\n- If you are upgrading any dependencies, please use yarn so `yarn.lock` is\n  updated.\n- Try to adhere to\n  [Angular commit guidelines](https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#-git-commit-guideline).\n\n## Alternatives\n\n[_node-schedule_](https://github.com/node-schedule/node-schedule) is a JS\nlibrary similar to [_node-cron_](https://github.com/kelektiv/node-cron) (which\nthis library is bindings for).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikaello%2Frescript-node-cron","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmikaello%2Frescript-node-cron","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikaello%2Frescript-node-cron/lists"}