agentscope.app.storageScheduleData
class ScheduleData(BaseModel)
agentscope/app/storage/_model/_schedule.py:40–105调度配置数据。位于 agentscope.app.storage 包。
The schedule configuration data. Declared in agentscope.app.storage.
属性摘要Attribute Summary
| 属性Attribute | 类型Type | 说明Description | 值Value |
|---|---|---|---|
name | str | 调度的展示名称。 | Field(description='Display name of the schedule.') |
description | str | `description` 字段。 | Field(default='', description='The description of the schedule, including its purpose, trigger conditions, etc.') |
enabled | bool | 已启用字段。 | Field(default=True, description='Whether the schedule is active. Disabled schedules are retained but will not trigger.') |
timezone | str | `timezone` 字段。 | Field(default=_get_local_timezone(), description="IANA timezone name used to evaluate the cron expression, e.g. 'America/New_York' or 'Asia/Shanghai'.") |
cron_expression | str | `cron_expression` 字段。 | Field(description="Standard 5-field cron expression, e.g. '0 9 * * 1-5'.") |
started_at | datetime | 已启动 at字段。 | Field(description='The date and time the schedule was started.', default_factory=lambda: datetime.now().astimezone()) |
ended_at | datetime | None | `ended_at` 字段。 | Field(default=None, description='The date and time the schedule was ended.') |
chat_model_config | ChatModelConfig | 聊天模型配置字段。 | Field(description='Model configuration for the auto-created session.') |
stateful | bool | `stateful` 字段。 | Field(title='Stateful', default=False, description='Whether consecutive executions share the same session context. If not, each execution will have its own state.') |
permission_mode | PermissionMode | 权限模式字段。 | Field(title='Permission mode', default=PermissionMode.DONT_ASK, description='Permission level for the agent during scheduled execution. Defaults to DONT_ASK since no user is present to answer prompts.') |
source | ScheduleSource | 来源字段。 | Field(default=ScheduleSource.USER, description='Indicates how this schedule was created.') |
source_session_id | str | 来源会话标识字段。 | Field(default='', description='The source session identifier, used for resource retrieval.') |
属性详情Attribute Detail
name
str = Field(description='Display name of the schedule.')调度的展示名称。
Display name of the schedule.
agentscope/app/storage/_model/_schedule.py:43description
str = Field(default='', description='The description of the schedule, including its purpose, trigger conditions, etc.')description 字段。声明为 str。
The description of the schedule, including its purpose, trigger conditions, etc.
agentscope/app/storage/_model/_schedule.py:45enabled
bool = Field(default=True, description='Whether the schedule is active. Disabled schedules are retained but will not trigger.')已启用字段。声明为 bool。
Whether the schedule is active.
agentscope/app/storage/_model/_schedule.py:51timezone
str = Field(default=_get_local_timezone(), description="IANA timezone name used to evaluate the cron expression, e.g. 'America/New_York' or 'Asia/Shanghai'.")timezone 字段。声明为 str。
IANA timezone name used to evaluate the cron expression, e.g.
agentscope/app/storage/_model/_schedule.py:57cron_expression
str = Field(description="Standard 5-field cron expression, e.g. '0 9 * * 1-5'.")cron_expression 字段。声明为 str。
Standard 5-field cron expression, e.g.
agentscope/app/storage/_model/_schedule.py:63started_at
datetime = Field(description='The date and time the schedule was started.', default_factory=lambda: datetime.now().astimezone())已启动 at字段。声明为 datetime。
The date and time the schedule was started.
agentscope/app/storage/_model/_schedule.py:67ended_at
datetime | None = Field(default=None, description='The date and time the schedule was ended.')ended_at 字段。声明为 datetime | None。
The date and time the schedule was ended.
agentscope/app/storage/_model/_schedule.py:72chat_model_config
ChatModelConfig = Field(description='Model configuration for the auto-created session.')聊天模型配置字段。声明为 ChatModelConfig。
Model configuration for the auto-created session.
agentscope/app/storage/_model/_schedule.py:77stateful
bool = Field(title='Stateful', default=False, description='Whether consecutive executions share the same session context. If not, each execution will have its own state.')stateful 字段。声明为 bool。
Whether consecutive executions share the same session context.
agentscope/app/storage/_model/_schedule.py:81permission_mode
PermissionMode = Field(title='Permission mode', default=PermissionMode.DONT_ASK, description='Permission level for the agent during scheduled execution. Defaults to DONT_ASK since no user is present to answer prompts.')权限模式字段。声明为 PermissionMode。
Permission level for the agent during scheduled execution.
agentscope/app/storage/_model/_schedule.py:88source
ScheduleSource = Field(default=ScheduleSource.USER, description='Indicates how this schedule was created.')来源字段。声明为 ScheduleSource。
Indicates how this schedule was created.
agentscope/app/storage/_model/_schedule.py:96source_session_id
str = Field(default='', description='The source session identifier, used for resource retrieval.')来源会话标识字段。声明为 str。
The source session identifier, used for resource retrieval.
agentscope/app/storage/_model/_schedule.py:101