Commit 1e12b5b1 authored by nanahira's avatar nanahira

no schedule on sub processes

parent d0ba2f73
......@@ -96,8 +96,9 @@ pool.on('error', function (err, client) {
└───────────────────────── second (0 - 59, OPTIONAL)
*/
var schedule = require('node-schedule');
// 每月的1日0点30分30秒触发 :'30 30 0 1 * *'
var j = schedule.scheduleJob('0 0 0 1 * *', function () {
if (!process.env.NO_SCHEDULE) {
// 每月的1日0点30分30秒触发 :'30 30 0 1 * *'
var j = schedule.scheduleJob('0 0 0 1 * *', function () {
console.log('The scheduleJob run on first day of every month!', moment().format('YYYY-MM-DD HH:mm'));
......@@ -132,11 +133,13 @@ var j = schedule.scheduleJob('0 0 0 1 * *', function () {
if (err) console.error('error running monthly scheduleJob', err);
});
});
});
});
// cron job
/**
// cron job
/**
* * * * * *
┬ ┬ ┬ ┬ ┬ ┬
│ │ │ │ │ |
......@@ -147,7 +150,7 @@ var j = schedule.scheduleJob('0 0 0 1 * *', function () {
│ └──────────────────── minute (0 - 59)
└───────────────────────── second (0 - 59, OPTIONAL)
*/
schedule.scheduleJob('1 1 0 1 1 *', function () {
schedule.scheduleJob('1 1 0 1 1 *', function () {
console.log('The scheduleJob run on 1 Jan !', moment().format('YYYY-MM-DD HH:mm'));
......@@ -167,8 +170,8 @@ schedule.scheduleJob('1 1 0 1 1 *', function () {
});
})
});
});
}
var Filter = require('bad-words-chinese');
var dirtyWords = require('../dirtyWordsChinese.json');
......
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