LoopCLI

Cloud Deployment

Deploying a loop to the hosted runner lets it execute even when your laptop is offline. The hosted scheduler now orchestrates queueing, locking, and retries by default—you simply provide a cron trigger.

Prerequisites

  • Authenticated CLI (loopcli auth login)
  • An active project (loopcli project list to confirm)
  • Hosted runner credentials configured in the dashboard

Deploy a loop

loopcli loop deploy daily-report --schedule "0 14 * * *" --activate
  • --schedule accepts standard cron syntax in UTC.
  • --activate flips the loop to run automatically. Use --disable to pause.

Queue and monitor executions

loopcli loop run daily-report --cloud --wait --json

The CLI waits for completion and prints the final execution payload. Use loopcli loop wait <executionId> to monitor from another terminal.

How scheduling works

LoopCLI's hosted orchestrator continuously claims due schedules, enqueues executions, records audit logs, and advances next_run_at. You just need a cron-like trigger that pings the platform.

Provide the cron trigger

  1. Set RUNNER_WORKER_SECRET in the dashboard environment. This shared secret authenticates your cron provider.
  2. Configure a minute-based job in your preferred service (Vercel Cron, GitHub Actions, Cloudflare Workers, etc.) to call:
    • POST https://app.loopcli.com/api/internal/scheduler/run
    • POST https://app.loopcli.com/api/internal/runner/process Include Authorization: Bearer $RUNNER_WORKER_SECRET (or X-Runner-Secret) on both requests.

Tip: the dashboard Scheduling tab shows ready-made examples, and loopcli loop worker:schedule prints the same curl/JSON snippets for copy-paste.

What the orchestrator handles for you

  • Claims due schedules with safe locking so overlapping cron pings are fine.
  • Enqueues executions with metadata that matches the loop + project.
  • Logs every attempt and automatically advances the next run window.
  • Routes work to hosted runners so you can scale worker invocations independently.

Optional manual commands

These CLI commands remain useful for debugging complex setups:

  • loopcli loop scheduler:run — claim schedules immediately (honors RUNNER_WORKER_SECRET).
  • loopcli loop worker:run — process a single queued execution.
  • Dashboard + CLI loop views expose the stored cron expression, timezone, and last/next run timestamps for quick inspection.

Troubleshooting

  • Execution stuck in queued: verify both the scheduler and worker cron jobs are firing with the correct secret.
  • Scheduler shows queued_with_warning: open the dashboard logs to inspect recent schedule runs; usually this indicates a schedule metadata update failed after queuing.
  • Error RUNNER_WORKER_SECRET missing: set the secret in the dashboard environment.
  • Rate limiting: reduce concurrency or add retries on the HTTP steps.

Related guides

Related Documentation

Continue learning with these related topics