← Back to library

Move self-hosted agent cron jobs to cloud scheduled tasks

Jonathan Malkin (u/jonathanmalkin) runs an open-source Claude Code setup with eleven cron jobs, a Slack daemon and nightly pipelines for retrospectives and morning briefings. When cloud scheduled tasks arrived, he sorted every job into restructure, move as-is or delete, found seven existed only to keep the server alive, and used git to carry state between runs.

  • OutcomeA clear plan for which scheduled agent jobs can leave your server, which need reshaping, and which can simply be deleted.
  • SetupAn afternoon+
  • LevelAdvanced
  • Creditu/jonathanmalkin on r/ClaudeCode
View original
Works with
Claude CodeClaudeChatGPT

Published Oct 23, 2026Updated Oct 23, 2026AI dry run on sample input: passed Oct 23, 2026Source verified Oct 23, 2026

When should you use it?

  • You maintain a server mainly to run scheduled agent jobs
  • Upkeep such as auth refreshes and health checks eats your time
  • Your jobs already keep their data in a git repository

Not for: Listeners that must stay connected, such as chat bots waiting for messages; Jobs that need sub-hourly schedules if your platform doesn't offer them

What do you need, and what do you get?

You need

  • A list of every cron job with what it reads and writes
  • Your repository and secrets setup
  • Access to cloud scheduled tasks

You get

  • Each job tagged move, restructure or delete
  • A migration order with git as the shared state
  • A list of blockers that keep part of the server

How does it work, step by step?

  1. Inventory every jobWrite down each scheduled task, its inputs, outputs and why it exists.
  2. Find the maintenance jobsMark jobs that only exist to keep the server healthy, such as token checks and container health; they may disappear.
  3. Move the simple onesShift jobs whose scripts and data already live in the repo, changing only where they run and how secrets arrive.
  4. Restructure pipelinesTurn parallel workers into one longer sequential session where shared context improves quality, and have each run commit its output.
  5. Name the blockersList anything that has to keep listening, like a message daemon, and keep only that on the server.

The prompt

Our own prompt, inspired by u/jonathanmalkin on r/ClaudeCode and written to work in Claude Code, Claude and ChatGPT. Values in lime are placeholders.

Fill in the blanks (optional; the copied prompt uses your values)

Prompt2 variables
Here is my list of scheduled agent jobs with what each reads, writes and depends on: {jobs}. The target platform runs scheduled tasks in a fresh environment each time, clones my repo, and supports {schedule_limits}. Classify each job as move as-is, restructure, delete (exists only for upkeep), or blocked (needs to stay running). For restructured jobs, describe the new shape and what they commit to git. Give a migration order and a one-week comparison test for each moved job. Do not move or delete any job until I approve the plan.

Inspired by u/jonathanmalkin on r/ClaudeCode: Claude Code Cloud Scheduled Tasks. One feature away from killing my VPS.. The prompt above is written by playbooks.bot in our own words; nothing from the original is quoted.

What can go wrong?

  • Each cloud run starts fresh; anything not committed to the repo is lost.
  • There may be no way to chain tasks, so a job that depends on another's output needs a time gap or a check.

Our take

The useful lesson here goes beyond any one product: count how much of your automation exists only to keep the automation running. Malkin found that most of his cron jobs were auth checks, secret refreshes and health reports, and a managed scheduler made them unnecessary. That's a good audit to run even if you never migrate. His second idea, letting git carry state from one run to the next, is simple and robust because every run starts from a fresh clone and leaves a commit you can inspect. Be honest about the jobs that don't fit; anything that must listen continuously is a different shape from a scheduled task. Migrate one simple job first, compare its output with the old version for a week, then move the pipelines. Keep secrets out of the repository and use the platform's secret injection. Finally, write down task dependencies explicitly, since a fresh environment won't remember that the retrospective must finish before the morning briefing starts.

Where the time goes back: Deleting jobs that only kept the system alive removes a whole category of overnight failures.

FAQ

What still needs his VPS?
A Slack daemon that listens all the time and opens a session when a message arrives; scheduled tasks can't wait for events.
Is his setup public?
Yes, he links the repository (jules) in the post.

Source and credit

Inspired by u/jonathanmalkin on r/ClaudeCode. We describe the idea in our own words, link to the original, and wrote the prompt ourselves; nothing is quoted.

Inspired by
Claude Code Cloud Scheduled Tasks. One feature away from killing my VPS.
Creator
u/jonathanmalkin on r/ClaudeCode
Published on
Reddit
Original date
Mar 24, 2026
License
Not openly licensed (the poster keeps all rights), so we quote nothing and link to the original
Originally for
Claude Code
AI dry run
Oct 23, 2026: passed. Dry-run tested by our AI test agent on sample input. PASS (desk check, not a live run in the vendor's app). Replaces an earlier templated dry-run note.
AI dry run on sample data; not run with live connected accounts. The playbooks.bot test agent filled the prompt with synthetic inputs, produced the output and checked it against the page's stated outputs and guardrails.
Verified
Oct 23, 2026: source link resolves to the original, the credited creator published it, our excerpt or prompt matches it, and the license allows our use.

Are you the creator? Claim or correct this page.

More in Operations & Admin

All 203 Operations & Admin playbooks →

Related playbooks

Operations & AdminPrompt✓ AI dry run

Rewrite a task prompt to go deeper, not bigger

Before handing an AI an important piece of work, have it explain how a leading practitioner would approach the job, which raw inputs and methods they would use, and what independent check would prove the answer right, then rewrite your request around those answers before any work starts.

Credit: Felix Rieseberg

Minutes
Operations & AdminSkill✓ AI dry run

Stress-test an idea with an honest devil's advocate

Get an AI to argue against your plan one serious objection at a time, offer real alternatives with tradeoffs, and openly mark each concern as resolved, narrowed or still open, so you end with a stronger plan or a better one.

Credit: u/wtfzambo on r/ChatGPTPromptGenius

Minutes
Operations & AdminPrompt✓ AI dry run

Draft client documents from records with no guessed facts

Have an AI draft deal reviews, timelines, requirements docs and similar client-facing documents only from your CRM, estimates, contracts and call notes, with every line traceable, conflicts between sources flagged to you, unconfirmed items labeled as open, and a person signing off before anything goes out.

Credit: Antonio Perrone

Minutes
Operations & AdminRoutine✓ AI dry run

Trigger useful work the moment a matching email arrives

Define filters on sender, recipient or subject so an assistant summarizes, drafts, extracts or researches as soon as matching mail arrives, with results saved for review.

Credit: XFreeze (@XFreeze)

Minutes
Operations & AdminWorkflow✓ AI dry run

Turn Slack and call notes into agent task briefs you approve

Watch Slack and call transcripts for work aimed at you, draft the prompt and data pulls for your coding or ops agent, and only run after you approve the brief.

Credit: u/Ok_Speech_7023 on r/ClaudeAI

An afternoon+