node-schedule定时任务
2016-05-07 15:11
627 查看
https://github.com/node-schedule/node-schedule
npm install node-schedule
[/code]
npm install node-schedule
[code]* * * * * * ┬ ┬ ┬ ┬ ┬ ┬ │ │ │ │ │ | │ │ │ │ │ └ day of week (0 - 7) (0 or 7 is Sun) │ │ │ │ └───── month (1 - 12) │ │ │ └────────── day of month (1 - 31) │ │ └─────────────── hour (0 - 23) │ └──────────────────── minute (0 - 59) └───────────────────────── second (0 - 59, OPTIONAL)
[/code]
var schedule = require('node-schedule'); var j = schedule.scheduleJob('42 * * * *', function(){ console.log('The answer to life, the universe, and everything!'); }); j.cancel();
相关文章推荐
- Node多国语言包
- nodejs入门必须知道的内容
- 用Nodejs做爬虫
- 222. Count Complete Tree Nodes
- iNode说明
- 用浏览器(支持WebSocket)和node-inspector 调试后端(CoffeeScript,Typescript)代码
- hdfs namenode/datanode工作机制
- node.js 创建子进程 I
- node.js 读写文件
- 简单web服务器学习总结
- nodejs学习笔记 —— win7下nodejs及npm的安装
- SAPGUI 740 错误 (Error: hostname 'NiHLGetNodeAddr' unknown)
- PRVF-7593 : CRS is not found to be installed on node "rac2"
- Wow6432Node
- 用 node-images 打造简易图片服务器(更新)
- 《Nodejs开发加密货币》之十:三张图让你全面掌握加密解密技术
- 《Nodejs开发加密货币》之九:在Nodejs中使用加密解密技术
- 利用node js快速模拟REST API
- LeetCode 019 Remove Nth Node From End of List
- nodepad++正则表达式使用