Commit 1ccd8929 authored by ganjingcun's avatar ganjingcun

cron

parent 9bbb8c6e
...@@ -50,8 +50,8 @@ pool.on('error', function (err, client) { ...@@ -50,8 +50,8 @@ pool.on('error', function (err, client) {
└───────────────────────── second (0 - 59, OPTIONAL) └───────────────────────── second (0 - 59, OPTIONAL)
*/ */
var schedule = require('node-schedule'); var schedule = require('node-schedule');
// 每月的1日0点30分30秒触发 :'30 30 0 1 * *'
var j = schedule.scheduleJob('1 0 1 * *', function () { var j = schedule.scheduleJob('30 30 0 1 * *', function () {
console.log('The scheduleJob run on first day of every month!'); console.log('The scheduleJob run on first day of every month!');
pool.connect(function (err, client, done) { pool.connect(function (err, client, done) {
......
...@@ -5,8 +5,8 @@ var superagent = require('superagent') ...@@ -5,8 +5,8 @@ var superagent = require('superagent')
var mement = require('moment') var mement = require('moment')
// var url = 'https://mycard.moe/ygopro/api/score' var url = 'https://mycard.moe/ygopro/api/score'
var url = 'http://localhost:3000/api/score' // var url = 'http://localhost:3000/api/score'
superagent superagent
.post(url) .post(url)
.send({ .send({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment