diff --git a/agent/tools/scheduler/scheduler_service.py b/agent/tools/scheduler/scheduler_service.py index 3125e3d..c55b224 100644 --- a/agent/tools/scheduler/scheduler_service.py +++ b/agent/tools/scheduler/scheduler_service.py @@ -61,8 +61,7 @@ class SchedulerService: self._check_and_execute_tasks() except Exception as e: logger.error(f"[Scheduler] Error in scheduler loop: {e}") - - # Sleep for 30 seconds between checks + time.sleep(30) def _check_and_execute_tasks(self): @@ -85,12 +84,9 @@ class SchedulerService: "last_run_at": now.isoformat() }) else: - # One-time task, disable it - self.task_store.update_task(task['id'], { - "enabled": False, - "last_run_at": now.isoformat() - }) - logger.info(f"[Scheduler] One-time task completed and disabled: {task['id']}") + # One-time task completed, remove it + self.task_store.delete_task(task['id']) + logger.info(f"[Scheduler] One-time task completed and removed: {task['id']}") except Exception as e: logger.error(f"[Scheduler] Error processing task {task.get('id')}: {e}") @@ -127,14 +123,11 @@ class SchedulerService: if time_diff > 300: # 5 minutes logger.warning(f"[Scheduler] Task {task['id']} is overdue by {int(time_diff)}s, skipping and scheduling next run") - # For one-time tasks, disable them + # For one-time tasks, remove them directly schedule = task.get("schedule", {}) if schedule.get("type") == "once": - self.task_store.update_task(task['id'], { - "enabled": False, - "last_run_at": now.isoformat() - }) - logger.info(f"[Scheduler] One-time task {task['id']} expired, disabled") + self.task_store.delete_task(task['id']) + logger.info(f"[Scheduler] One-time task {task['id']} expired, removed") return False # For recurring tasks, calculate next run from now diff --git a/channel/web/static/js/console.js b/channel/web/static/js/console.js index a8db519..1616e94 100644 --- a/channel/web/static/js/console.js +++ b/channel/web/static/js/console.js @@ -19,7 +19,7 @@ const I18N = { menu_logs: '日志', welcome_subtitle: '我可以帮你解答问题、管理计算机、创造和执行技能,并通过长期记忆
不断成长', example_sys_title: '系统管理', example_sys_text: '帮我查看工作空间里有哪些文件', - example_task_title: '智能任务', example_task_text: '提醒我5分钟后查看服务器情况', + example_task_title: '技能系统', example_task_text: '查看所有支持的工具和技能', example_code_title: '编程助手', example_code_text: '帮我编写一个Python爬虫脚本', input_placeholder: '输入消息...', config_title: '配置管理', config_desc: '管理模型和 Agent 配置', @@ -65,7 +65,7 @@ const I18N = { menu_logs: 'Logs', welcome_subtitle: 'I can help you answer questions, manage your computer, create and execute skills, and keep growing through
long-term memory.', example_sys_title: 'System', example_sys_text: 'Show me the files in the workspace', - example_task_title: 'Smart Task', example_task_text: 'Remind me to check the server in 5 minutes', + example_task_title: 'Skills', example_task_text: 'Show current tools and skills', example_code_title: 'Coding', example_code_text: 'Write a Python web scraper script', input_placeholder: 'Type a message...', config_title: 'Configuration', config_desc: 'Manage model and agent settings',