add screesnshots date wise for debugging

main
saif 2025-01-01 16:12:03 +05:00
parent 4afcaff2cf
commit 0d22675923
1 changed files with 8 additions and 1 deletions

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