actually stop jobs

This commit is contained in:
Jacob Janzen 2024-12-08 04:26:58 +00:00
parent caaf3e9081
commit 350d91f8b4

1
app.js
View file

@ -77,6 +77,7 @@ app.post('/', verifyKeyMiddleware(process.env.PUBLIC_KEY), async function (req,
const id = options[0].value;
const content = id in jobs ? `stopped job ${id}` : `no such job ${id}`;
if (id in jobs) {
job_crons[id].stop();
delete jobs[id]
delete job_crons[id];