{"id":21392436,"url":"https://github.com/baymac/material-ui-cron","last_synced_at":"2025-07-13T18:31:23.425Z","repository":{"id":48477803,"uuid":"348791394","full_name":"baymac/material-ui-cron","owner":"baymac","description":"A React cron library using material ui","archived":false,"fork":false,"pushed_at":"2022-11-20T17:38:38.000Z","size":1205,"stargazers_count":6,"open_issues_count":6,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-13T19:58:22.564Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://baymac.github.io/material-ui-cron/","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/baymac.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-03-17T17:14:03.000Z","updated_at":"2024-01-19T01:25:09.000Z","dependencies_parsed_at":"2023-01-21T21:41:30.624Z","dependency_job_id":null,"html_url":"https://github.com/baymac/material-ui-cron","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baymac%2Fmaterial-ui-cron","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baymac%2Fmaterial-ui-cron/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baymac%2Fmaterial-ui-cron/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baymac%2Fmaterial-ui-cron/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/baymac","download_url":"https://codeload.github.com/baymac/material-ui-cron/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225908614,"owners_count":17543478,"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-22T13:40:47.629Z","updated_at":"2024-11-22T13:40:48.232Z","avatar_url":"https://github.com/baymac.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Material UI Cron\r\n\r\n[![npm package](https://img.shields.io/npm/v/material-ui-cron/latest.svg)](https://www.npmjs.com/package/material-ui-cron)\r\n[![MIT License Badge](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/baymac/material-ui-cron/blob/master/LICENSE.md)\r\n\r\nA React cron editor built with [material ui](https://material-ui.com/)\r\n\r\nLive **demo** and **usage** at\r\n[https://baymac.github.io/material-ui-cron/](https://baymac.github.io/material-ui-cron/?path=/story/material-ui-cron--scheduler-demo)\r\n\r\n![material-ui-cron demo](/docs/material-ui-cron-demo.png)\r\n\r\n## Inspired by\r\n\r\n- [react-cron-js](https://github.com/xrutayisire/react-js-cron)\r\n\r\n## Installation\r\n\r\nBe sure that you have these dependencies on your project:\r\n\r\n- react (\u003e=17.0.1)\r\n- @material-ui/core (\u003e5.0.0-beta.1)\r\n- @material-ui/styles: (\u003e5.0.0-beta.1)\r\n\r\nMore dependencies\r\n\r\n```bash\r\n# Yarn\r\nyarn add material-ui-cron\r\n\r\n# NPM\r\nnpm install --save material-ui-cron\r\n```\r\n\r\n## Usage\r\n\r\n```javascript\r\nimport Scheduler from 'material-ui-cron'\r\nimport React from 'react'\r\n\r\nexport default function SchedulerDemo() {\r\n  const [cronExp, setCronExp] = React.useState('0 0 * * *')\r\n  const [cronError, setCronError] = React.useState('') // get error message if cron is invalid\r\n  const [isAdmin, setIsAdmin] = React.useState(true) // set admin or non-admin to enable or disable high frequency scheduling (more than once a day)\r\n\r\n  return (\r\n    \u003cScheduler\r\n      cron={cronExp}\r\n      setCron={setCronExp}\r\n      setCronError={setCronError}\r\n      isAdmin={isAdmin}\r\n    /\u003e\r\n  )\r\n}\r\n```\r\n\r\n## TypeScript\r\n\r\n`material-ui-cron` is written in TypeScript with complete definitions.\r\n\r\n## Internalization and Localization\r\n\r\nThis library supports Internalization (i18n). Currently languages supported are:\r\n\r\n1. English\r\n\r\nWe are welcoming translation contributions from the community.\r\n\r\n### How to contribute to translation\r\n\r\n1. Clone `/src/localization/enLocal.ts` and rename it to desired langauge prefix\r\n   (based on\r\n   https://meta.wikimedia.org/wiki/Template:List_of_language_names_ordered_by_code).\r\n\r\n2. Add language prefix to `definedLocales` type inside `/src/types.ts`\r\n\r\n3. Add locale mapping inside `/src/i18n.ts`\r\n\r\n### How to use translation\r\n\r\n#### Using predefined locale:\r\n\r\n```javascript\r\n\u003cScheduler\r\n  cron={cronExp}\r\n  setCron={setCronExp}\r\n  setCronError={setCronError}\r\n  isAdmin={isAdmin}\r\n  locale={'en'} // if not supplied, localization defaults to en\r\n/\u003e\r\n```\r\n\r\n#### Using custom locale:\r\n\r\n```javascript\r\n\u003cScheduler\r\n  cron={cronExp}\r\n  setCron={setCronExp}\r\n  setCronError={setCronError}\r\n  isAdmin={isAdmin}\r\n  customLocale={{...your translations}} // should be a valid object of type Locale, overrides value supplied to locale prop\r\n/\u003e\r\n```\r\n\r\n## Acknowledgement\r\n\r\nThis library was developed as a part of [Udaan](https://udaan.com/)'s Data\r\nPlatform for scheduling queries. Big thanks to\r\n[Amod Malviya](https://github.com/amodm) for supporting this project.\r\n\r\n## License\r\n\r\nMIT © [baymac](https://github.com/baymac)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaymac%2Fmaterial-ui-cron","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbaymac%2Fmaterial-ui-cron","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaymac%2Fmaterial-ui-cron/lists"}