Fixed file permissions

This commit is contained in:
Morten Olsen
2021-12-18 18:51:18 +01:00
parent ecf382b486
commit 3b5dbb0c15
3 changed files with 6 additions and 1 deletions

View File

@@ -9,7 +9,9 @@ run.action(runBackup)
const schedule = program.command('schedule');
schedule.action(() => {
const schedule = process.env.SCHEDULE || '0 0 3 * * Sunday';
console.log(`Starting with schedule ${schedule}`)
cron.schedule(schedule, () => {
console.log('Starting backup task')
runBackup().catch((err) => {
console.error(err);
process.exit(-1);