All Projects → jingjingke → crontab

jingjingke / crontab

Licence: other
在弹层界面中组合成crontab表达式,然后实时解析最近5条满足条件的时间(结果),整体可当做VUE组件使用,也可将解析方法单独拎出来。

Programming Languages

javascript
184084 projects - #8 most used programming language
Vue
7211 projects
CSS
56736 projects
HTML
75241 projects

Projects that are alternatives of or similar to crontab

Cron Parser
Java Parser For Cron Expressions
Stars: ✭ 176 (+214.29%)
Mutual labels:  crontab
fast-laravel
基于Swoole的高性能HTTP服务器,加速您Laravel应用程序。
Stars: ✭ 33 (-41.07%)
Mutual labels:  crontab
serverless-local-schedule
⚡️🗺️⏰ Schedule AWS CloudWatch Event based invocations in local time(with DST support!)
Stars: ✭ 68 (+21.43%)
Mutual labels:  crontab
Cronsun
A Distributed, Fault-Tolerant Cron-Style Job System.
Stars: ✭ 2,493 (+4351.79%)
Mutual labels:  crontab
xxl-job-executor-go
xxl-job 执行器(golang 客户端)
Stars: ✭ 298 (+432.14%)
Mutual labels:  crontab
TT Jobs
基于 Swoole 定时管理系统
Stars: ✭ 22 (-60.71%)
Mutual labels:  crontab
Docker Crontab
A docker job scheduler (aka. crontab for docker)
Stars: ✭ 159 (+183.93%)
Mutual labels:  crontab
async cron
crontab for python,with asyncio
Stars: ✭ 23 (-58.93%)
Mutual labels:  crontab
threat-broadcast
威胁情报播报(停止运营)
Stars: ✭ 147 (+162.5%)
Mutual labels:  crontab
aria2-bt-tracker
auto update aria2 bt-tracker
Stars: ✭ 35 (-37.5%)
Mutual labels:  crontab
Opendevops
CODO是一款为用户提供企业多混合云、一站式DevOps、自动化运维、完全开源的云管理平台、自动化运维平台
Stars: ✭ 2,990 (+5239.29%)
Mutual labels:  crontab
it-tools
A programing helper for developers built with Electron & Vue.js 🚀
Stars: ✭ 114 (+103.57%)
Mutual labels:  crontab
delay-timer
Time-manager of delayed tasks. Like crontab, but synchronous asynchronous tasks are possible scheduling, and dynamic add/cancel/remove is supported.
Stars: ✭ 257 (+358.93%)
Mutual labels:  crontab
Cronv
A visualizer for CRONTAB
Stars: ✭ 196 (+250%)
Mutual labels:  crontab
node-cron-expression
Declarative functional cron expression builder
Stars: ✭ 17 (-69.64%)
Mutual labels:  crontab
Crontab
Yii2 extension for crontab support
Stars: ✭ 170 (+203.57%)
Mutual labels:  crontab
flask-crontab
Simple Flask scheduled tasks without extra daemons
Stars: ✭ 99 (+76.79%)
Mutual labels:  crontab
watchman
📆 更夫(watchman)是一款可视化的定时任务配置 Web 工具,麻麻不用担心我漏掉任何更新啦!
Stars: ✭ 40 (-28.57%)
Mutual labels:  crontab
xiaoniu cron
基于APScheduler二次开发,支持集群,可视化,API动态调用等等。BUG及时通知到微信,网页等等。
Stars: ✭ 53 (-5.36%)
Mutual labels:  crontab
croner
Trigger functions and/or evaluate cron expressions in JavaScript. No dependencies. Most features. All environments.
Stars: ✭ 169 (+201.79%)
Mutual labels:  crontab

crontab

界面是用VUE去建设的,但是在运算逻辑还是以Javascript为主。尤其解析crontab相应时间结果,稍显复杂。

线上访问地址:https://jingjingke.github.io/crontab/dist/

npm发布

该项目npm包名:vue-crontab-ui,具体内容指路npmjs分支。

目前master分支的内容已经合并到npmjs中,若后期有bug需要维护,可以在master分支中拉出新的分支,再将代码合到master与npmjs中。这样能够保最大程度保持代码一致性。

目录结构

其它都是套路,主要说一下src目录中的文件主要是做什么的。


├── App.vue                      // 开始界面
├── main.js                      // 入口文件
├── assets                       // 静态资源:样式/图片等
├── components                   // crontab组件们
│   ├── Crontab.vue              // crontab组件主界面
│   ├── crontab.js               // crontab组件主界面使用的js代码
│   ├── Crontab-Year.vue         // “年”组件
│   ├── crontab-year.js          // “年”组件使用的js代码
│   ├── Crontab-Mouth.vue        // “月”组件
│   ├── crontab-mouth.js         // “月”组件使用的js代码
│   ├── Crontab-Day.vue          // “日”组件
│   ├── crontab-day.js           // “日”组件使用的js代码
│   ├── Crontab-Hour.vue         // “时”组件
│   ├── crontab-hour.js          // “时”组件使用的js代码
│   ├── Crontab-Min.vue          // “分”组件
│   ├── crontab-min.js           // “分”组件使用的js代码
│   ├── Crontab-Second.vue       // “秒”组件
│   ├── crontab-second.js        // “秒”组件使用的js代码
│   ├── Crontab-Result.vue       // “结果”组件(解析最近5次运行时间)
│   └── crontab-result.js        // “结果”组件使用的js代码


解析逻辑

逻辑、表达式如果有我理解不正确的地方,欢迎提意见。虽然是依托VUE去做的项目,但是解析的代码用原生JS也是可以实现的。

具体可以参考:src/components/Crontab-result.js中的expressionChange()方法,这是解析的主要方法。它首先会将表达式用空格分隔成几块,再对每一个小规则进行操作。

其中用的比较多的就是各种数组,例如我会将符合规则的秒数放在一个数组中;另一个就是利用continue label跳出指定循环(例如向上跳两层for循环)。

文件中也有相应的注释,读起来应该不会太费力~~

效果截图

效果截图

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].