-
Notifications
You must be signed in to change notification settings - Fork 0
/
schedule.js
46 lines (43 loc) · 1.32 KB
/
schedule.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
39
40
41
42
43
44
//說明
//Cron Syntax
//# ┌────────────── second(optional)
//# │ ┌──────────── minute
//# │ │ ┌────────── hour
//# │ │ │ ┌──────── day of month
//# │ │ │ │ ┌────── month
//# │ │ │ │ │ ┌──── day of week
//# │ │ │ │ │ │
//# │ │ │ │ │ │
//# * * * * * *
//Allowed values
//field value
//second 0- 59
//minute 0- 59
//hour 0- 23
//day of month 1- 31
//month 1- 12(or names)
//day of week 0- 7(or names, 0 or 7 are sunday)
exports.getConfig = function () {
var config =
[
{
//每隔一分鐘
corn: '*/1 * * * *',
apiurl: [
"https://tw.news.yahoo.com/快新聞-國內首驗出b-1-621哥倫比亞變異株-在美打2劑bnt返台仍確診-064720173.html"
]
},
{
//凌晨兩點
corn: '0 2 * * *',
apiurl: [
"https://xxxx.stust.edu.tw/xxxx/ashx/xxxx.ashx",
"http://xxxx.stust.edu.tw/xxxx/ashx/xxxx.ashx"
]
},
];
return config;
}
exports.hello = function () {
return "hello";
}