Merge branch 'develop' into adiDev

This commit is contained in:
AdisakKanthawilang 2025-03-06 13:49:04 +07:00
commit 5f91e11042
2 changed files with 29 additions and 20 deletions

View file

@ -12,7 +12,7 @@ import { RegisterRoutes } from "./routes";
import { OrganizationController } from "./controllers/OrganizationController";
import logMiddleware from "./middlewares/logs";
import { CommandController } from "./controllers/CommandController";
import { ProfileSalaryController } from "./controllers/ProfileSalaryController";
import { WebSocketServer } from "ws";
import http from "http";
@ -85,6 +85,19 @@ async function main() {
}
});
const cronTime_Tenure = "0 0 * * *";
cron.schedule(cronTime_Tenure, async () => {
try {
const profileSalaryController = new ProfileSalaryController();
await profileSalaryController.cronjobTenurePositionOfficer();
await profileSalaryController.cronjobTenureLevelOfficer();
await profileSalaryController.cronjobTenurePositionEmployee();
await profileSalaryController.cronjobTenureLevelEmployee();
} catch (error) {
console.error("Error executing function from controller:", error);
}
});
// app.listen(APP_PORT, APP_HOST, () => console.log(`Listening on: http://localhost:${APP_PORT}`));
// app.listen(
// APP_PORT,