tms-koa-agenda
v0.2.15
Published
tms-koa控制器插件,任务调度。
Downloads
68
Readme
测试
获取access_token
curl -X POST -H "Content-type: application/json" "http://localhost:3009/auth/authenticate" -d '{"username":"admin","password":"admin"}'
定义任务
curl 'http://localhost:3009/api/agenda/define?access_token=<access_token>' -H 'Content-Type: application/json' -X POST -d '{"name":"job001"}'
立刻执行一次任务
curl 'http://localhost:3009/api/agenda/now?access_token=<access_token>' -H 'Content-Type: application/json' -X POST -d '{"name":"job001","data":{"url":"http://localhost:3009/api/tryGet?access_token=<access_token>&value=hello","method":"GET"}}'