Class AgentQuartzJob

java.lang.Object
io.agentscope.extensions.scheduler.quartz.AgentQuartzJob
All Implemented Interfaces:
org.quartz.InterruptableJob, org.quartz.Job

public class AgentQuartzJob extends Object implements org.quartz.InterruptableJob
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.

  • Constructor Details

    • AgentQuartzJob

      public AgentQuartzJob()
  • Method Details

    • execute

      public void execute(org.quartz.JobExecutionContext context) throws org.quartz.JobExecutionException
      Executes the agent task.
      Specified by:
      execute in interface org.quartz.Job
      Parameters:
      context - The Quartz JobExecutionContext
      Throws:
      org.quartz.JobExecutionException - if the job execution fails
    • interrupt

      public void interrupt()
      Interrupts the currently running job.
      Specified by:
      interrupt in interface org.quartz.InterruptableJob