Skip to content

Commit

Permalink
Check if logs dir exist and create if not
Browse files Browse the repository at this point in the history
  • Loading branch information
rodriciru authored Oct 24, 2022
1 parent f08f8d4 commit cad0bc1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crontab.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ var cronstrue = require('cronstrue/i18n');
var humanCronLocate = process.env.HUMANCRON ?? "en"
var noNeedUpdateDB = false;

if (!fs.existsSync(exports.log_folder)){
fs.mkdirSync(exports.log_folder);
}

crontab = function(name, command, schedule, stopped, logging, mailing){
var data = {};
Expand Down

0 comments on commit cad0bc1

Please sign in to comment.