TechnicalInsightful

Come usare il comando /loop su Claude Code [tutorial semplice]

Raffaele Gaito

This tutorial demonstrates how to use the /loop command in Claude Code on a Hostinger VPS to execute automated tasks at regular intervals (e.g., checking for new website content, monitoring competitors). The /loop command creates background cron jobs that run continuously without requiring the user's computer to remain powered on, and can be monitored remotely via phone.

Summary

The video tutorial explains how to leverage Claude Code's /loop command, which enables automated execution of prompts or tasks at user-defined intervals on a VPS (Virtual Private Server) rather than on a local computer. The presenter emphasizes the key advantage of using a VPS hosted on Hostinger: tasks continue running 24/7 even when the user's computer is turned off, unlike local Cloud Code instances. The tutorial covers setting up a proper workspace on the VPS by creating dedicated project folders (avoiding work in the root directory for security reasons) and then demonstrates the /loop command syntax: /loop [minutes] [command/prompt]. An example use case shows monitoring a news website (il post.it) for new articles every minute. The presenter clarifies that /loop is distinct from agentic loops—it simply schedules recurring task execution rather than enabling autonomous agent behavior. The tutorial demonstrates checking active loops, managing multiple simultaneous loops (for news, email, competitor analysis, etc.), and stopping loops when needed. A key practical feature shown is the ability to use Remote Control to monitor active loops from a mobile phone while away from the computer, with real-time synchronization. The presenter also provides information about Hostinger's promotional pricing structure and recommends their comprehensive Cloud Code course for deeper mastery.

Key Insights

  • The /loop command is fundamentally different from agentic loops—it performs repeated task execution on a schedule rather than enabling autonomous agent behavior, which the speaker emphasizes is a common point of confusion due to naming choices by Anthropic.
  • Working in the root directory on a VPS is dangerous and should be avoided; instead, users should create dedicated project folders organized by client, project, or channel to maintain proper folder structure and security.
  • Background loops created with /loop are technically cron jobs that continue running 24/7 on a VPS, allowing users to step away from their computer entirely while automated checks happen in the background.
  • The /loop command frees up the chat interface—users can continue having conversations with Claude while background loops are actively running in parallel, without blocking other commands.
  • Remote Control functionality enables users to monitor active loops and check their status from a mobile phone in real-time with synchronization, even while away from their desk.

Topics

/loop command in Claude CodeVPS hosting and cloud-based automationCron jobs and background task schedulingWorkspace organization and folder structureRemote monitoring and mobile accessUse cases: news monitoring, competitor analysis, video release trackingHostinger VPS setup and promotional codes

Transcript

[0:00] Today in this tutorial I will show you how we can use the {slash} loop command of Cloud Code, which is a command that allows us to have a continuous execution at a precise interval that we decide on a certain prompt, so for example we want something to happen every 5 minutes, every minute, every hour and so on. And we do it on a Cloud Code instance that is on a VPS, so not on our computer. Remember the difference, we've already seen it in another video. When we put it on our computer, [0:31] obviously the moment we say we close the computer in the evening, we turn it off in the evening, we can no…

Full transcript available for MurmurCast members

Sign Up to Access

More from Raffaele Gaito

Get AI summaries like this delivered to your inbox daily

Get AI summaries delivered to your inbox

MurmurCast summarizes your YouTube channels, podcasts, and newsletters into one daily email digest.