From 94f1b3c88d2178c9c323fb278883b1ab33325768 Mon Sep 17 00:00:00 2001 From: rodriciru Date: Mon, 24 Oct 2022 13:32:04 +0200 Subject: [PATCH] Fix log dir error on docker if not created --- crontab.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crontab.js b/crontab.js index 113036d..576b79b 100644 --- a/crontab.js +++ b/crontab.js @@ -26,6 +26,9 @@ var cron_parser = require("cron-parser"); var cronstrue = require('cronstrue/i18n'); var humanCronLocate = process.env.HUMANCRON ?? "en" +if (!fs.existsSync(exports.log_folder)){ + fs.mkdirSync(exports.log_folder); +} crontab = function(name, command, schedule, stopped, logging, mailing){ var data = {};