Files
node_learning_module_1/day4/cronjobs/example.js
T

5 lines
148 B
JavaScript
Raw Normal View History

2022-02-06 20:58:17 -05:00
const db = require('../models');
(async function tokenCronJob() {
await db.query('UPDATE `token` SET status=0 WHERE `expire_at` < NOW();');
})();