actually stop jobs
This commit is contained in:
parent
caaf3e9081
commit
350d91f8b4
1 changed files with 1 additions and 0 deletions
1
app.js
1
app.js
|
@ -77,6 +77,7 @@ app.post('/', verifyKeyMiddleware(process.env.PUBLIC_KEY), async function (req,
|
||||||
const id = options[0].value;
|
const id = options[0].value;
|
||||||
const content = id in jobs ? `stopped job ${id}` : `no such job ${id}`;
|
const content = id in jobs ? `stopped job ${id}` : `no such job ${id}`;
|
||||||
if (id in jobs) {
|
if (id in jobs) {
|
||||||
|
job_crons[id].stop();
|
||||||
delete jobs[id]
|
delete jobs[id]
|
||||||
delete job_crons[id];
|
delete job_crons[id];
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue