@@ -562,7 +562,8 @@ func gatewayCmd() {
562562 })
563563
564564 // Setup cron tool and service
565- cronService := setupCronTool (agentLoop , msgBus , cfg .WorkspacePath (), cfg .Agents .Defaults .RestrictToWorkspace )
565+ execTimeout := time .Duration (cfg .Tools .Cron .ExecTimeoutMinutes ) * time .Minute
566+ cronService := setupCronTool (agentLoop , msgBus , cfg .WorkspacePath (), cfg .Agents .Defaults .RestrictToWorkspace , execTimeout )
566567
567568 heartbeatService := heartbeat .NewHeartbeatService (
568569 cfg .WorkspacePath (),
@@ -987,14 +988,14 @@ func getConfigPath() string {
987988 return filepath .Join (home , ".picoclaw" , "config.json" )
988989}
989990
990- func setupCronTool (agentLoop * agent.AgentLoop , msgBus * bus.MessageBus , workspace string , restrict bool ) * cron.CronService {
991+ func setupCronTool (agentLoop * agent.AgentLoop , msgBus * bus.MessageBus , workspace string , restrict bool , execTimeout time. Duration ) * cron.CronService {
991992 cronStorePath := filepath .Join (workspace , "cron" , "jobs.json" )
992993
993994 // Create cron service
994995 cronService := cron .NewCronService (cronStorePath , nil )
995996
996997 // Create and register CronTool
997- cronTool := tools .NewCronTool (cronService , agentLoop , msgBus , workspace , restrict )
998+ cronTool := tools .NewCronTool (cronService , agentLoop , msgBus , workspace , restrict , execTimeout )
998999 agentLoop .RegisterTool (cronTool )
9991000
10001001 // Set the onJob handler
0 commit comments