Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-arena-api
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
ygopro-arena-api
Commits
1e12b5b1
Commit
1e12b5b1
authored
May 01, 2020
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no schedule on sub processes
parent
d0ba2f73
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
66 additions
and
63 deletions
+66
-63
routes/api.js
routes/api.js
+66
-63
No files found.
routes/api.js
View file @
1e12b5b1
...
...
@@ -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
'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment