mirror of
https://github.com/openmhz/trunk-server.git
synced 2026-11-14 01:37:48 -05:00
Cleaning!
This commit is contained in:
@@ -294,10 +294,19 @@ io.sockets.on('connection', function (client) {
|
|||||||
stats.init_stats();
|
stats.init_stats();
|
||||||
// This will run at 3am each day.
|
// This will run at 3am each day.
|
||||||
// IF you don't set the minute to 0, it will run every minute while it is still 3, so at 3:01, 3:02... etc
|
// IF you don't set the minute to 0, it will run every minute while it is still 3, so at 3:01, 3:02... etc
|
||||||
let cleanupSched = schedule.scheduleJob('0 3 * * *', function() {
|
schedule.scheduleJob('0 3 * * *', function() {
|
||||||
db.cleanOldCalls();
|
db.cleanOldCalls();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
schedule.scheduleJob('15 3 * * *', function() {
|
||||||
|
db.cleanOldEvents();
|
||||||
|
});
|
||||||
|
|
||||||
|
schedule.scheduleJob('30 3 * * *', function() {
|
||||||
|
db.cleanOldPodcasts();
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
server.listen(app.get("port"), (err) => {
|
server.listen(app.get("port"), (err) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
console.err(err.stack)
|
console.err(err.stack)
|
||||||
|
|||||||
Reference in New Issue
Block a user