add screesnshots date wise for debugging

This commit is contained in:
2025-01-01 16:12:03 +05:00
parent 4afcaff2cf
commit 0d22675923
+8 -1
View File
@@ -12,7 +12,14 @@ const utils = require("./utils");
(async function () {
console.log(`===========< STARTED ${luxon.DateTime.now()} >=========`);
const screenshotDirectory = path.join(__dirname, "screenshots");
const syncDate = luxon.DateTime.now().toFormat("yyyy-MM-dd");
const screenshotDirectory = path.join(__dirname, `screenshots/${syncDate}`);
if ( !fs.existsSync(screenshotDirectory) ) {
fs.mkdirSync( screenshotDirectory, { recursive: true });
}
/**
* loading config data