forked from YueDayu/zjzs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
auto_maintain.js
39 lines (37 loc) · 860 Bytes
/
auto_maintain.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
var sweeper = require("./models/sweeper");
var assigner= require("./models/assign_seat");
var cm = require("./weixin_basic/custom_menu");
var act_info = require('./weixin_basic/activity_info');
var urls = require('./address_configure.js');
var currentHour=(new Date()).getHours();
if (currentHour!=4)
{
console.log("Wrong time to exec.")
if (urls.autoRefresh==true)
{
cm.isExit=true;
act_info.getCurrentActivity(cm.autoClearOldMenus);
}
else
{
process.exit(0);
}
}
else
{
sweeper(function()
{
assigner(function()
{
if (urls.autoRefresh==true)
{
cm.isExit=true;
act_info.getCurrentActivity(cm.autoClearOldMenus);
}
else
{
process.exit(0);
}
});
});
}