diff --git a/pkg/tools/cron.go b/pkg/tools/cron.go index 30a8e92cd..8c15772eb 100644 --- a/pkg/tools/cron.go +++ b/pkg/tools/cron.go @@ -8,7 +8,6 @@ import ( "github.com/sipeed/picoclaw/pkg/bus" "github.com/sipeed/picoclaw/pkg/config" - "github.com/sipeed/picoclaw/pkg/constants" "github.com/sipeed/picoclaw/pkg/cron" "github.com/sipeed/picoclaw/pkg/utils" ) @@ -199,9 +198,6 @@ func (t *CronTool) addJob(ctx context.Context, args map[string]any) *ToolResult if !t.execEnabled { return ErrorResult("command execution is disabled") } - if !constants.IsInternalChannel(channel) { - return ErrorResult("scheduling command execution is restricted to internal channels") - } if !t.allowCommand && !commandConfirm { return ErrorResult("command_confirm=true is required when allow_command is disabled") } @@ -318,6 +314,7 @@ func (t *CronTool) ExecuteJob(ctx context.Context, job *cron.CronJob) string { } args := map[string]any{ + "action": "run", "command": job.Payload.Command, "__channel": channel, "__chat_id": chatID,