AS AgentScopeAPI 手册 / API Reference

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
contextJobExecutionContext上下文(类型 `JobExecutionContext`)。The Quartz JobExecutionContext
抛出Throws
  • JobExecutionException 可能抛出 `JobExecutionException`。Thrown when the operation cannot be completed.
源码Source io/agentscope/extensions/scheduler/quartz/AgentQuartzJob.java:47–115

interrupt

public void interrupt()

请求中断当前执行。

Interrupts the currently running job.

源码Source io/agentscope/extensions/scheduler/quartz/AgentQuartzJob.java:120–123
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.