AgentQuartzJob
public class AgentQuartzJob implements InterruptableJob
源码Source
io/agentscope/extensions/scheduler/quartz/AgentQuartzJob.java:35–124智能体 Quartz 作业,承载智能体的部署、调度与服务化运行。位于 io.agentscope.extensions.scheduler.quartz 包,实现 InterruptableJob。核心成员包括 execute、interrupt。
Quartz Job implementation that executes an AgentScope agent task.
This job retrieves the corresponding QuartzAgentScheduler and
QuartzScheduleAgentTask using job data, and then executes the agent's run logic.
It also handles the rescheduling for FIXED_DELAY tasks.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public void execute(JobExecutionContext context) throws JobExecutionException | 设置执行。 Executes the agent task. |
public void interrupt() | 请求中断当前执行。 Interrupts the currently running job. |
方法详情Method Detail
execute
public void execute(JobExecutionContext context) throws JobExecutionException
设置执行。
Executes the agent task.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
context | JobExecutionContext | 上下文(类型 `JobExecutionContext`)。The Quartz JobExecutionContext |
JobExecutionException可能抛出 `JobExecutionException`。Thrown when the operation cannot be completed.
源码Source
io/agentscope/extensions/scheduler/quartz/AgentQuartzJob.java:47–115interrupt
public void interrupt()
请求中断当前执行。
Interrupts the currently running job.
源码Source
io/agentscope/extensions/scheduler/quartz/AgentQuartzJob.java:120–123