{"id":20578760,"url":"https://github.com/cclient/ts-crontab","last_synced_at":"2026-04-22T04:06:25.514Z","repository":{"id":93977669,"uuid":"58118807","full_name":"cclient/ts-crontab","owner":"cclient","description":"typescript实现的任务调度框架，主要为避免linux crontab 前次尚未执行结束，新任务就又被触发,便于任务集中管理","archived":false,"fork":false,"pushed_at":"2017-12-06T07:28:48.000Z","size":82,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-06T11:43:54.692Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cclient.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2016-05-05T09:09:25.000Z","updated_at":"2018-05-22T09:35:40.000Z","dependencies_parsed_at":"2023-05-24T17:00:46.248Z","dependency_job_id":null,"html_url":"https://github.com/cclient/ts-crontab","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cclient/ts-crontab","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cclient%2Fts-crontab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cclient%2Fts-crontab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cclient%2Fts-crontab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cclient%2Fts-crontab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cclient","download_url":"https://codeload.github.com/cclient/ts-crontab/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cclient%2Fts-crontab/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32120409,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-22T00:31:26.853Z","status":"online","status_checked_at":"2026-04-22T02:00:05.693Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-16T06:14:29.538Z","updated_at":"2026-04-22T04:06:25.472Z","avatar_url":"https://github.com/cclient.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"typescript\nes6\npromise\nasync/await\nmongodb\ngulp\n\ntypescript 实现的定时任务\n\nAccountAddFieldPromise promise版\nAccountAddFieldPromise async/await版\n\n# 编译(切换置项目dir)\n\n## gulp build\n\n# 测试单作务\n\n## node lib/cron/AccountAddFieldAsyncAwait.js\n\n# 启动多作务\n\n## node lib/cron/index.js\n\n\n# 备注\n\n最初使用typescript的初衷是强类型，和async/await(算是es7的标准，在es5还是主流，es6尚未发布之时,typescript早早就支持了，受够了es5的回调和流程控制，async,co,generator凑合用过段时间，体验并不好，后期则都迁移至typescript)\n\n个人有.net + java工作经验，js的开发体验很糟糕\n\n因关注 MS Build 2015 了解到 Visual Studio Code，最早的亮点是是js定义文件，和强类型语法提示（比其他ide猜类型不知道高到哪里去了，省得老得跑去看各种包的readme和源码）\n\n非前端的nodejs工作 ide便渐由webstrom 转为 VSC，又由VSC了解到 typescript，尝试性将es5往typescript迁移，最初便是该project。\n\n第一版完成于2015年，其时es6尚未发布，第三包甚至官方包都尚不支持es6,且大量缺少描述文件,typescript版本低，社区的支持并不好，为了兼容，代码里有大量es5语法，es5+typescript显得不伦不类，也无法100%typescript的体验。\n\n比如为了引es5的包，不能用import 还得按nodejs es5 cmd的方式引入\n\nmodule.exports.analysisAllUserPromise = analysisAllUserPromise\nvar mongodb = require(\"mongodb\");\n\ntsd少则不说(总不能老自已花工夫写，成本太高)，且不能自动引入，只能自已手动加描述到文件列头\n\u003c!-- -///\u003cTypeScriptExperimentalAsyncFunctions\u003etrue\u003c/TypeScriptExperimentalAsyncFunctions\u003e\n-/// \u003creference path='../../typings/node/node.d.ts' /\u003e\n-/// \u003creference path='../../typings/mongodb/mongodb.d.ts' /\u003e\n-/// \u003creference path='../../typings/redis/redis.d.ts' /\u003e --\u003e\n\n随着es6的升级，第三方包的升级，对typescript的支持越来越好，只是1年多点的时间，开发体验大大提升。\n\n业余抽时间将原es5+typescript1.*的混合模式，更新为es6+typescript2.*,并添加了几项demo，回头看旧的代码问题很多，只是demo性质，也没时间细改，就还保持原样。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcclient%2Fts-crontab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcclient%2Fts-crontab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcclient%2Fts-crontab/lists"}