Change backup interval
parent
2e4ec1e360
commit
b50886dda6
|
@ -1,4 +1,4 @@
|
||||||
"use strict"
|
"use strict";
|
||||||
|
|
||||||
const cron = require('cron');
|
const cron = require('cron');
|
||||||
const async = require('async');
|
const async = require('async');
|
||||||
|
@ -59,8 +59,8 @@ const createBackup = () => {
|
||||||
// Execute daily @ 02:30 AM
|
// Execute daily @ 02:30 AM
|
||||||
const cronJobSignature = cron.job('00 30 02 * * *', createAllSignatures);
|
const cronJobSignature = cron.job('00 30 02 * * *', createAllSignatures);
|
||||||
|
|
||||||
// Execute daily @ 04:00 AM
|
// Execute daily @ 04:00 AM, on Mon, Thu and Sat
|
||||||
const cronJobBackup = cron.job('00 00 04 * * *', createBackup);
|
const cronJobBackup = cron.job('00 00 04 * * 0,3,5', createBackup);
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
cronJobSignature: cronJobSignature,
|
cronJobSignature: cronJobSignature,
|
|
@ -8,7 +8,7 @@ const logger = require('debug')('cc:command');
|
||||||
const codes = require('./http-codes');
|
const codes = require('./http-codes');
|
||||||
|
|
||||||
const routerHandling = require('../middleware/router-handling');
|
const routerHandling = require('../middleware/router-handling');
|
||||||
const createAllSignatures = require('../cron-job/update-signatures').createAllSignatures;
|
const createAllSignatures = require('../cron-job/cron').createAllSignatures;
|
||||||
const createSignature = require('../signature-tool/signature-tool');
|
const createSignature = require('../signature-tool/signature-tool');
|
||||||
|
|
||||||
const command = express.Router();
|
const command = express.Router();
|
||||||
|
|
|
@ -16,8 +16,8 @@ const restAPIchecks = require('./middleware/request-checks.js');
|
||||||
const errorResponseWare = require('./middleware/error-response');
|
const errorResponseWare = require('./middleware/error-response');
|
||||||
const apiAuthenticationMiddleware = require('./middleware/auth-middleware');
|
const apiAuthenticationMiddleware = require('./middleware/auth-middleware');
|
||||||
const checkAdmin = require('./middleware/permission-check').checkAdmin;
|
const checkAdmin = require('./middleware/permission-check').checkAdmin;
|
||||||
const signatureCronJob = require('./cron-job/update-signatures').cronJobSignature;
|
const signatureCronJob = require('./cron-job/cron').cronJobSignature;
|
||||||
const backupCronJob = require('./cron-job/update-signatures').cronJobBackup;
|
const backupCronJob = require('./cron-job/cron').cronJobBackup;
|
||||||
|
|
||||||
|
|
||||||
// router modules
|
// router modules
|
||||||
|
|
Loading…
Reference in New Issue