mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-05-22 19:47:15 +00:00
Merge c8ef26b289 into e911e5e03a
This commit is contained in:
commit
9109816cc4
2 changed files with 10 additions and 10 deletions
|
|
@ -1035,11 +1035,11 @@ def parse_task_schedule(schedule_data: Dict[str, str]) -> TaskSchedule:
|
|||
"""Parse dictionary into TaskSchedule with validation."""
|
||||
try:
|
||||
return TaskSchedule(
|
||||
minute=schedule_data.get('minute', '*'),
|
||||
hour=schedule_data.get('hour', '*'),
|
||||
day=schedule_data.get('day', '*'),
|
||||
month=schedule_data.get('month', '*'),
|
||||
weekday=schedule_data.get('weekday', '*'),
|
||||
minute=str(schedule_data.get('minute', '*')),
|
||||
hour=str(schedule_data.get('hour', '*')),
|
||||
day=str(schedule_data.get('day', '*')),
|
||||
month=str(schedule_data.get('month', '*')),
|
||||
weekday=str(schedule_data.get('weekday', '*')),
|
||||
timezone=schedule_data.get('timezone', Localization.get().get_timezone())
|
||||
)
|
||||
except Exception as e:
|
||||
|
|
|
|||
|
|
@ -156,11 +156,11 @@ class SchedulerTool(Tool):
|
|||
dedicated_context: bool = kwargs.get("dedicated_context", False)
|
||||
|
||||
task_schedule = TaskSchedule(
|
||||
minute=schedule.get("minute", "*"),
|
||||
hour=schedule.get("hour", "*"),
|
||||
day=schedule.get("day", "*"),
|
||||
month=schedule.get("month", "*"),
|
||||
weekday=schedule.get("weekday", "*"),
|
||||
minute=str(schedule.get("minute", "*")),
|
||||
hour=str(schedule.get("hour", "*")),
|
||||
day=str(schedule.get("day", "*")),
|
||||
month=str(schedule.get("month", "*")),
|
||||
weekday=str(schedule.get("weekday", "*")),
|
||||
)
|
||||
|
||||
# Validate cron expression, agent might hallucinate
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue