Files
weipan02_server/nodejs/data.js
你的名字 0483b4b364 1
2025-07-14 10:22:40 +08:00

99 lines
2.5 KiB
JavaScript
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

var localurl = 'weipan07_server',
http = require('https'),
schedule = require('node-schedule'),
headers = {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36"};
// 定时器每1秒执行
schedule.scheduleJob('*/1 * * * * *', function(){
var option = {
host: localurl,
timeout: 5000,
path: '/index/index/order',
headers: headers
};
http.request(option, function (res) {
var data = "";
res.on("data", function (_data) {
});
res.on("end", function () {
});
}).end();
});
// 定时器每1秒执行
schedule.scheduleJob('*/1 * * * * *', function(){
var option = {
host: localurl,
timeout: 5000,
path: '/index/index/product',
headers: headers
};
http.request(option, function (res) {
var data = "";
res.on("data", function (_data) {
});
res.on("end", function () {
});
}).end();
});
// 定时器每1秒执行
schedule.scheduleJob('*/1 * * * * *', function(){
var option = {
host: localurl,
timeout: 5000,
path: '/index/index/yebeveryday?token=ABCD484088',
headers: headers
};
http.request(option, function (res) {
var data = "";
res.on("data", function (_data) {
});
res.on("end", function () {
});
}).end();
});
// 定时器每1秒执行
schedule.scheduleJob('*/1 * * * * *', function(){
var option = {
host: localurl,
timeout: 5000,
path: '/index/index/yebeveryday1?token=ABCD484088',
headers: headers
};
http.request(option, function (res) {
var data = "";
res.on("data", function (_data) {
});
res.on("end", function () {
});
}).end();
});
// 定时器每1秒执行
schedule.scheduleJob('*/1 * * * * *', function(){
var option = {
host: localurl,
timeout: 5000,
path: '/index/index/yebeveryday2?token=ABCD484088',
headers: headers
};
http.request(option, function (res) {
var data = "";
res.on("data", function (_data) {
});
res.on("end", function () {
});
}).end();
});