diff --git a/dist/index.js b/dist/index.js index 84863f9..35af880 100644 --- a/dist/index.js +++ b/dist/index.js @@ -39,9 +39,10 @@ class App { else { console.log("No new games were Added!"); } + this.writeLog('Successfully ran project'); } catch (error) { - console.error("Error in cron job:", error.message); + this.writeLog("Error in cron job:" + error.message); } finally { this.writeLog('END CRON JOB'); // Log when the cron job ends diff --git a/src/index.ts b/src/index.ts index e3e2c8c..8748234 100644 --- a/src/index.ts +++ b/src/index.ts @@ -45,8 +45,9 @@ class App { } else { console.log("No new games were Added!"); } + this.writeLog('Successfully ran project'); } catch (error) { - console.error("Error in cron job:", error.message); + this.writeLog("Error in cron job:" + error.message); } finally { this.writeLog('END CRON JOB'); // Log when the cron job ends }