From ac3835a0935bf69196365fbd3dd3ed6cb41c1be8 Mon Sep 17 00:00:00 2001 From: 2210045 <2210045@P9801Y.kjbank.dom> Date: Thu, 26 Feb 2026 11:37:29 +0900 Subject: [PATCH] =?UTF-8?q?cronCommand=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../eai/agent/cron/UpdateCronCommand.java | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 src/com/eactive/eai/agent/cron/UpdateCronCommand.java diff --git a/src/com/eactive/eai/agent/cron/UpdateCronCommand.java b/src/com/eactive/eai/agent/cron/UpdateCronCommand.java new file mode 100644 index 0000000..bb3917a --- /dev/null +++ b/src/com/eactive/eai/agent/cron/UpdateCronCommand.java @@ -0,0 +1,43 @@ +package src.com.eactive.eai.agent.cron; + +import com.eactive.eai.agent.command.Command; +import com.eactive.eai.agent.command.CommandException; +import com.eactive.eai.common.scheduler.SchedulerManager; +import com.eactive.eai.common.util.Logger; + +public class UpdateCronCommand extends Command{ + private static final long serialVersionUID = 1L; + + public UpdateCronCommand() { + super(); + } + + public UpdateCronCommand(String name) { + super(name); + } + + public Object execute() throws CommandException + { + Logger logger = Logger.getLogger(Logger.LOGGER_SCHEDULLER); + logger.info(this.name + " Agent 가 호출되었습니다."); + + if ( args == null || !(args instnaceof String)) { + String msg = makeException("BECEAICAG001", null); + } + + try { + SchedulerManager schmng = SchedulerManager.getInstance(); + + schmng.stop(); + schmng.start(); + + logger.info(this.name + " Agent 가 성공적으로 완료되었습니다."); + return "success"; + }catch(Exception e) + { + String msg = makeException("BECEAICAG002", e); + logger.error(msg, e); + throw new CommandException(msg); + } + } +}