提交 76cc89bc 编写于 作者: 许雪里's avatar 许雪里

GLUE(NodeJs)模式任务,示例代码

上级 145a9006
......@@ -234,13 +234,16 @@ logging.info("脚本文件:" + sys.argv[0])
-->
</textarea>
<textarea class="glueSource_nodejs" style="display:none;" >
// #!/usr/bin/node
#!/usr/bin/env node
console.log("xxl-job: hello nodejs")
var arguments = process.argv
console.log("脚本文件: " + arguments[1])
for (var i = 2; i < arguments.length; i++){
console.log("参数: %s, %s", i, arguments[i]);
console.log("参数 %s = %s", (i-1), arguments[i]);
}
console.log("Good bye!")
process.exit(0)
</textarea>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册