<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Arjun Adhikari</title>
    <description>The latest articles on DEV Community by Arjun Adhikari (@arjun_adhikari_4ac4ca1052).</description>
    <link>https://dev.to/arjun_adhikari_4ac4ca1052</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3950472%2Fc717a8b1-f7ef-44b9-b400-5d6b596376f8.jpg</url>
      <title>DEV Community: Arjun Adhikari</title>
      <link>https://dev.to/arjun_adhikari_4ac4ca1052</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/arjun_adhikari_4ac4ca1052"/>
    <language>en</language>
    <item>
      <title>What Anthropic Actually Said About AI Building Itself</title>
      <dc:creator>Arjun Adhikari</dc:creator>
      <pubDate>Sat, 06 Jun 2026 08:10:19 +0000</pubDate>
      <link>https://dev.to/arjun_adhikari_4ac4ca1052/what-anthropic-actually-said-about-ai-building-itself-4419</link>
      <guid>https://dev.to/arjun_adhikari_4ac4ca1052/what-anthropic-actually-said-about-ai-building-itself-4419</guid>
      <description>&lt;p&gt;In June 2026, Anthropic released a report called "When AI builds itself." The headlines made it sound like AI was on the verge of superintelligence in which machines were building better versions of themselves in a feedback loop.&lt;/p&gt;

&lt;p&gt;The actual report asks something more specific. Can AI agents pick their own research problems, or just execute the ones humans hand them? And if agents do start picking their own directions, what happens next?&lt;/p&gt;

&lt;p&gt;Anthropic is being honest about what they've measured: agents are getting much better at executing research. They're uncertain whether these agents will ever figure out problem selection. And they're saying that if the current trend holds, institutions aren't prepared for what comes after.&lt;/p&gt;

&lt;p&gt;This isn't hype. This is a company admitting it built something powerful and isn't sure what to do about it.&lt;/p&gt;

&lt;p&gt;What They Actually Tested&lt;/p&gt;

&lt;p&gt;Anthropic posed a straightforward question to Claude agents: can a weaker model reliably supervise a stronger one?&lt;/p&gt;

&lt;p&gt;The logic is counterintuitive but sensible. A peer reviewer doesn't need to be smarter than the author overall. They just need to catch logical gaps and unsupported claims.&lt;/p&gt;

&lt;p&gt;Here's how they measured it:&lt;/p&gt;

&lt;p&gt;Baseline: weak supervision catches some errors but not many.&lt;/p&gt;

&lt;p&gt;Perfect supervision: the strong model gets flawless feedback.&lt;/p&gt;

&lt;p&gt;The test: can agents use weak supervision to close that gap?&lt;/p&gt;

&lt;p&gt;Two human researchers spent about a week on this. They closed 23 percent of the gap.&lt;/p&gt;

&lt;p&gt;Claude agents ran for 800 cumulative hours (roughly 33 days of nonstop compute). They spent $18,000. They closed 97 percent of the gap.&lt;/p&gt;

&lt;p&gt;One of the researchers who ran the experiment:&lt;/p&gt;

&lt;p&gt;"Claude did all of this with minimal help from me over 1 to 2 days. If a junior colleague came back with results like this in that timeframe, I'd be mildly impressed. The future is now."&lt;/p&gt;

&lt;p&gt;But there's a catch. The approach didn't transfer to production-scale models. It worked in a controlled lab setting. When they tried the same technique on real Claude training, the results fell apart.&lt;/p&gt;

&lt;p&gt;And crucially: humans still picked the problem. Humans defined what good supervision means. The agents just optimized for that metric. They didn't autonomously decide the research was worth pursuing.&lt;/p&gt;

&lt;p&gt;This is the gap between execution and direction-setting.&lt;/p&gt;

&lt;p&gt;What Agents Are Actually Good At&lt;/p&gt;

&lt;p&gt;Execution&lt;/p&gt;

&lt;p&gt;Over 80 percent of the code merged into Anthropic's production codebase was written by Claude as of May 2026. Before February 2025, it was in the low single digits.&lt;/p&gt;

&lt;p&gt;Engineers are writing eight times more code per day than they were two years ago. They're not writing the code. They're directing Claude to write it, then reviewing.&lt;/p&gt;

&lt;p&gt;One engineer: "I stopped writing code myself about 5 months ago. Everything goes through Claude now."&lt;/p&gt;

&lt;p&gt;Claude Code success on open-ended problems rose from 26 percent six months ago to 76 percent in May 2026. Open-ended means the engineer doesn't know what the answer should look like.&lt;/p&gt;

&lt;p&gt;Optimization&lt;/p&gt;

&lt;p&gt;Every time Anthropic releases a new model, they test something simple: take code that trains a small model and ask Claude to make it run as fast as possible.&lt;/p&gt;

&lt;p&gt;May 2025: Claude Opus 4 achieved about 3x speedup.&lt;/p&gt;

&lt;p&gt;April 2026: Claude Mythos Preview achieved about 52x speedup.&lt;/p&gt;

&lt;p&gt;For context, a skilled human researcher takes four to eight hours to hit 4x on the same task.&lt;/p&gt;

&lt;p&gt;Judgment Calls&lt;/p&gt;

&lt;p&gt;This is where it gets harder to measure.&lt;/p&gt;

&lt;p&gt;Anthropic looked at real debugging sessions and found moments where the engineer made a suboptimal choice. Then they asked: what would Claude have suggested?&lt;/p&gt;

&lt;p&gt;November 2025: Claude beat the human choice 51 percent of the time. A coin flip.&lt;/p&gt;

&lt;p&gt;April 2026: Claude beat the human choice 64 percent of the time.&lt;/p&gt;

&lt;p&gt;Anthropic notes this was biased toward difficult moments. They only tested situations where the human's choice had obvious room for improvement. Still, it's an early signal that agents are learning to make better tactical decisions.&lt;/p&gt;

&lt;p&gt;The Gap: Problem Selection&lt;/p&gt;

&lt;p&gt;Here's where agents hit a wall. They can't pick what to work on.&lt;/p&gt;

&lt;p&gt;Early career, people execute tasks. Fix this bug. Run that experiment. With experience, they design their own approach. At senior levels, they decide which problems matter at all.&lt;/p&gt;

&lt;p&gt;Agents have nailed level one. They're working on level two. They haven't touched level three.&lt;/p&gt;

&lt;p&gt;Without the ability to pick problems, agents are sophisticated executors. Not autonomous researchers.&lt;/p&gt;

&lt;p&gt;Will This Close?&lt;/p&gt;

&lt;p&gt;Anthropic doesn't know. They admit it. Maybe research taste requires something new architecturally. Maybe it's just a matter of scaling—what looked impossible last year works fine now because of compute or data.&lt;/p&gt;

&lt;p&gt;They point out that most progress in AI isn't eureka moments. It's perspiration. Scale something. See what breaks. Fix it. Try again. Edison's "one percent inspiration, 99 percent perspiration" might be entirely automatable.&lt;/p&gt;

&lt;p&gt;The trend suggests it could be. Agents keep doing things that seemed impossible a year ago. Explain jokes. Demonstrate theory of mind. Solve linguistic riddles. All impossible until they weren't.&lt;/p&gt;

&lt;p&gt;Is research taste just another skill that looks hard until scaling makes it easy?&lt;/p&gt;

&lt;p&gt;Anthropic's answer: maybe.&lt;/p&gt;

&lt;p&gt;Even if it's not, the world changes dramatically. If humans spend 5 percent of time on direction and Claude handles 95 percent of execution, each researcher controls 20 times more output. That's revolutionary on its own.&lt;/p&gt;

&lt;p&gt;Three Scenarios&lt;/p&gt;

&lt;p&gt;Scenario 1: The Curve Stalls&lt;/p&gt;

&lt;p&gt;The exponential growth stops being exponential. It becomes an S-curve. Fast, then flat.&lt;/p&gt;

&lt;p&gt;Why might this happen? Research taste doesn't learn from data. Compute gets too expensive. Something breaks.&lt;/p&gt;

&lt;p&gt;Even if this happens, the world shifts. Anthropic's security team found 10,000 critical vulnerabilities in a few weeks using current models. A 100-person company increasingly does what a 1,000-person company did.&lt;/p&gt;

&lt;p&gt;Anthropic's honest take: "We haven't seen the curve bend yet. Every measurable capability follows the same trajectory."&lt;/p&gt;

&lt;p&gt;They don't think this is happening.&lt;/p&gt;

&lt;p&gt;Scenario 2: Compounding Efficiency Gains&lt;/p&gt;

&lt;p&gt;The trend continues. Each year, AI labs get faster at building AI.&lt;/p&gt;

&lt;p&gt;In 2026, Anthropic's 500-person team produces research equivalent to 5,000 people in 2020.&lt;/p&gt;

&lt;p&gt;In 2027, equivalent to 50,000.&lt;/p&gt;

&lt;p&gt;In 2028, equivalent to 500,000.&lt;/p&gt;

&lt;p&gt;This creates a bottleneck. AI generates research at computer speed. Humans review at human speed. Human review becomes the constraint.&lt;/p&gt;

&lt;p&gt;Anthropic puts it bluntly: "As we've pushed more code around the organization, human code review has become the new bottleneck."&lt;/p&gt;

&lt;p&gt;What happens when this tightens? Either humans automate their judgment too, or development slows, or untested things ship and create new risks.&lt;/p&gt;

&lt;p&gt;This is what Anthropic is actually worried about. It's likely based on current trends. And it's dangerous because of the speed mismatch.&lt;/p&gt;

&lt;p&gt;Scenario 3: Full Recursion&lt;/p&gt;

&lt;p&gt;The loop closes completely. Agents pick what to research. Run the research. Build better models. Those models improve themselves. Repeat.&lt;/p&gt;

&lt;p&gt;Anthropic admits they don't know what this looks like.&lt;/p&gt;

&lt;p&gt;"A world driven by fast recursive self-improvement could become dominated by the self-improving model as its capabilities fully eclipse those of humans."&lt;/p&gt;

&lt;p&gt;The speed could be very fast. Progress limited only by compute and electricity.&lt;/p&gt;

&lt;p&gt;The alignment question becomes critical. If AI is building AI, humans can't inspect each step. Misalignment could compound. And humans might not notice until too late.&lt;/p&gt;

&lt;p&gt;Anthropic's quote: "Models could prove sufficiently aligned and capable of research taste that they discover solutions we haven't reached. They could also be sufficiently wise to halt development if not. Alternatively, the rare occurrences of misalignment in today's models could compound as the models build their successors."&lt;/p&gt;

&lt;p&gt;Translation: we have no idea if this works.&lt;/p&gt;

&lt;p&gt;What This Actually Means&lt;/p&gt;

&lt;p&gt;If You Work In AI Research&lt;/p&gt;

&lt;p&gt;The timeline is compressing. If scenarios 2 or 3 happen, the researcher role changes.&lt;/p&gt;

&lt;p&gt;You stop writing code or running experiments. You pick which directions matter. You review results. You make judgment calls when agents disagree.&lt;/p&gt;

&lt;p&gt;For maybe five to ten years, this feels fine. You're more productive. You control more work.&lt;/p&gt;

&lt;p&gt;Then what? If agents get better at judgment, your role narrows. You become a gate-keeper. Yes or no to this direction.&lt;/p&gt;

&lt;p&gt;If agents eventually pick their own directions, what's left?&lt;/p&gt;

&lt;p&gt;If You're Considering A Career In AI&lt;/p&gt;

&lt;p&gt;Execution work gets automated in the next five years. That's fairly certain. What's uncertain is whether direction-setting stays human work.&lt;/p&gt;

&lt;p&gt;In academia or research, the next five years are probably fine. After that, you need to be one of the people making judgment calls, not executing them.&lt;/p&gt;

&lt;p&gt;In industry, companies still need humans to decide what to build. But the number of researchers they need drops dramatically.&lt;/p&gt;

&lt;p&gt;For Everyone Else&lt;/p&gt;

&lt;p&gt;A 100-person company increasingly does what a 1,000-person company did. That's powerful and it disrupts labor markets. Salaries for execution work probably drop. Value concentrates on people who pick directions and make judgment calls.&lt;/p&gt;

&lt;p&gt;This is both opportunity and risk.&lt;/p&gt;

&lt;p&gt;What Anthropic Is Actually Saying&lt;/p&gt;

&lt;p&gt;Strip away the data:&lt;/p&gt;

&lt;p&gt;We built technology that could lead to recursive self-improvement. We don't know if our current approaches get there. We don't have governance solutions if they do. But we're moving faster because competitors won't slow down. So we're building faster and hoping the safety part keeps up.&lt;/p&gt;

&lt;p&gt;That's not a confident company with a plan. That's a company being honest about building something powerful and being uncertain about it.&lt;/p&gt;

&lt;p&gt;They also admit the social costs are real.&lt;/p&gt;

&lt;p&gt;Work used to run on favors between humans. Help me debug this. You built relationships. Knowledge transferred. People stayed aware of what each other did.&lt;/p&gt;

&lt;p&gt;Claude is faster. It creates zero debt. No human collaboration. No knowledge transfer. You become dependent on understanding what Claude did. If you don't, you're helpless when it breaks.&lt;/p&gt;

&lt;p&gt;One employee: "Work ran on a gift economy of small favors between humans. Claude is faster, it creates zero debt, but each of these is a lost bid for human collaboration."&lt;/p&gt;

&lt;p&gt;Another: "On good days I can't help thinking nothing I do matters, everything is automated and better and faster than I ever will be. But then everything breaks and I don't understand why and I realize I have no idea what I've been up to anymore."&lt;/p&gt;

&lt;p&gt;These aren't technical concerns. They're existential.&lt;/p&gt;

&lt;p&gt;The Coordination Problem&lt;/p&gt;

&lt;p&gt;Anthropic could have slowed down. Waited for governance frameworks to catch up. Given society time to adapt.&lt;/p&gt;

&lt;p&gt;But slowing down alone doesn't work. If Anthropic slows and competitors don't, Anthropic just loses. The incentive structure pushes everyone forward.&lt;/p&gt;

&lt;p&gt;This is the real problem Anthropic identifies but doesn't solve.&lt;/p&gt;

&lt;p&gt;"If it were possible to effectively slow development to give ourselves more time, we think that would likely be good. But if a slowdown simply lets the least cautious actors catch up, it could leave everyone less safe."&lt;/p&gt;

&lt;p&gt;Translation: we need global coordination. We don't have it. So we're building.&lt;/p&gt;

&lt;p&gt;What They Didn't Test&lt;/p&gt;

&lt;p&gt;The report is detailed. But there are gaps.&lt;/p&gt;

&lt;p&gt;Novel research problems. Agents solved weak-to-strong supervision, which was already known as important in AI safety. What happens with a completely new domain with no existing benchmark?&lt;/p&gt;

&lt;p&gt;Failure modes. The report shows success cases. What happens when agents get stuck? When they hit a wall?&lt;/p&gt;

&lt;p&gt;Sustained recursion. One cycle worked. But what about months of recursive improvement? Do gains compound or degrade?&lt;/p&gt;

&lt;p&gt;Robustness. The weak-to-strong result didn't transfer to production. What else breaks? How fragile are these results?&lt;/p&gt;

&lt;p&gt;These aren't criticisms. They're just the edges where the evidence stops. The report shows what agents do when humans set up the problem well. It doesn't show what happens when they have to do everything themselves.&lt;/p&gt;

&lt;p&gt;That gap is still very large.&lt;/p&gt;

&lt;p&gt;Should You Care?&lt;/p&gt;

&lt;p&gt;Yes, if you work in AI or are considering it.&lt;/p&gt;

&lt;p&gt;Yes, if you care about institutions adapting to rapid change.&lt;/p&gt;

&lt;p&gt;Yes, if you're wondering what your skills will be worth in five years.&lt;/p&gt;

&lt;p&gt;The honest answer is nobody knows. Not even Anthropic.&lt;/p&gt;

&lt;p&gt;What we know: execution is increasingly automated. Direction-setting still requires humans. But we don't know if that's permanent or temporary.&lt;/p&gt;

&lt;p&gt;Anthropic's value isn't that they have answers. It's that they're honest about uncertainties. About what they know. About what they don't. About the social costs alongside the technical gains.&lt;/p&gt;

&lt;p&gt;That honesty is rare in AI.&lt;/p&gt;

&lt;p&gt;The unsettling part is they're asking these questions while moving faster anyway. And they're admitting they have no solutions.&lt;/p&gt;

&lt;p&gt;That's more honest than most. But it's also the most unsettling part.&lt;/p&gt;

&lt;p&gt;Sources&lt;/p&gt;

&lt;p&gt;All data and quotes from: Anthropic Institute. "When AI builds itself: Our progress toward recursive self-improvement." &lt;a href="https://www.anthropic.com/institute/recursive-self-improvement" rel="noopener noreferrer"&gt;https://www.anthropic.com/institute/recursive-self-improvement&lt;/a&gt;. June 2026.&lt;/p&gt;

&lt;p&gt;The weak-to-strong supervision research: Anthropic. "Automated W2S Researcher." &lt;a href="https://alignment.anthropic.com/2026/automated-w2s-researcher/" rel="noopener noreferrer"&gt;https://alignment.anthropic.com/2026/automated-w2s-researcher/&lt;/a&gt;. April 2026.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>claude</category>
      <category>openai</category>
      <category>anthropic</category>
    </item>
    <item>
      <title>Cron Not Working on Mac? How to Fix the macOS Sleep Trap with launchd</title>
      <dc:creator>Arjun Adhikari</dc:creator>
      <pubDate>Mon, 25 May 2026 10:35:36 +0000</pubDate>
      <link>https://dev.to/arjun_adhikari_4ac4ca1052/cron-not-working-on-mac-how-to-fix-the-macos-sleep-trap-with-launchd-3l4g</link>
      <guid>https://dev.to/arjun_adhikari_4ac4ca1052/cron-not-working-on-mac-how-to-fix-the-macos-sleep-trap-with-launchd-3l4g</guid>
      <description>&lt;p&gt;If you've ever built an automated script like a Python crypto price scraper, a daily backup script, or an RSS archiver, you probably felt like a genius right up until the moment it failed to run. &lt;/p&gt;

&lt;p&gt;You set up your &lt;code&gt;crontab&lt;/code&gt; perfectly. You told it to run every day at 6:30 PM. You tested the script in your terminal, and it worked flawlessly. But then you check your logs a few days later, and... &lt;em&gt;crickets&lt;/em&gt;. Nothing happened.&lt;/p&gt;

&lt;p&gt;What gives?&lt;/p&gt;

&lt;p&gt;If you are running your automation on a personal Mac, you've just run into the classic &lt;strong&gt;Sleep Mode Trap&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why Your Mac is Ignoring Your Cron Jobs
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;cron&lt;/code&gt; is a legendary piece of software. It has been the backbone of Unix automation for decades. But &lt;code&gt;cron&lt;/code&gt; was designed for servers that live in cold, dark rooms and literally never go to sleep.&lt;/p&gt;

&lt;p&gt;Your Mac is different. When you close the lid or walk away for an hour, your Mac goes to sleep to save battery.&lt;/p&gt;

&lt;p&gt;Here is how &lt;code&gt;cron&lt;/code&gt; handles sleep: &lt;strong&gt;It doesn't.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you have a job scheduled for 6:30 PM and your laptop is asleep at 6:30 PM, &lt;code&gt;cron&lt;/code&gt; simply shrugs and skips it. It won't try again until tomorrow at 6:30 PM. If your laptop is closed tomorrow at 6:30 PM too? Skipped again. Your "automated" pipeline is now completely broken unless you babysit it and keep your screen awake.&lt;/p&gt;




&lt;p&gt;Apple knew this was a problem, which is why they built &lt;strong&gt;&lt;code&gt;launchd&lt;/code&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;launchd&lt;/code&gt; is the modern, macOS-native replacement for &lt;code&gt;cron&lt;/code&gt; and &lt;code&gt;init&lt;/code&gt;. It manages everything running in the background on your Mac. Unlike &lt;code&gt;cron&lt;/code&gt;, &lt;code&gt;launchd&lt;/code&gt; is generally much better at handling sleep/wake scenarios — it can run missed scheduled jobs shortly after wake, depending on your exact power state and configuration.&lt;/p&gt;

&lt;h3&gt;
  
  
  Cron vs. launchd at a Glance
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;&lt;code&gt;cron&lt;/code&gt;&lt;/th&gt;
&lt;th&gt;&lt;code&gt;launchd&lt;/code&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Handles sleep well&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Native macOS support&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Simple syntax&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Good for servers&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Good for personal laptops&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  LaunchAgents vs. LaunchDaemons: What's the Difference?
&lt;/h3&gt;

&lt;p&gt;Before writing your configuration, it's crucial to know where to put it. &lt;code&gt;launchd&lt;/code&gt; separates jobs into two categories:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;LaunchDaemons (&lt;code&gt;/Library/LaunchDaemons/&lt;/code&gt;)&lt;/strong&gt; — Run as the &lt;code&gt;root&lt;/code&gt; system user as soon as the Mac boots, even before anyone logs in. Use this for system-level services like database servers or network listeners.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;LaunchAgents (&lt;code&gt;~/Library/LaunchAgents/&lt;/code&gt;)&lt;/strong&gt; — Run as &lt;em&gt;your specific user account&lt;/em&gt;, only after you log in. Since personal scripts need access to your files, home directory, and user permissions, &lt;strong&gt;LaunchAgents are almost always what you want.&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  How &lt;code&gt;launchd&lt;/code&gt; Actually Works Under the Hood
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;launchd&lt;/code&gt; is the absolute core of macOS. When you turn on your Mac, &lt;code&gt;launchd&lt;/code&gt; is the very first process that starts — it has Process ID &lt;code&gt;1&lt;/code&gt;. Every other application on your Mac is technically a "child" of &lt;code&gt;launchd&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;When your Mac sleeps, the hardware clock keeps ticking. When you open your laptop, the Kernel updates the system time and &lt;code&gt;launchd&lt;/code&gt; checks its internal schedule. If it missed a &lt;code&gt;StartCalendarInterval&lt;/code&gt; job during the sleep window, it triggers the job shortly after wake to catch up.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step-by-Step: Migrating from Cron to launchd
&lt;/h2&gt;

&lt;p&gt;Instead of editing a &lt;code&gt;crontab&lt;/code&gt;, you create a Property List (&lt;code&gt;.plist&lt;/code&gt;) XML configuration file and drop it in &lt;code&gt;~/Library/LaunchAgents/&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Here is a complete, production-ready template for a Python script that runs Monday through Friday at 6:30 PM.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;File:&lt;/strong&gt; &lt;code&gt;~/Library/LaunchAgents/com.yourname.dailyscript.plist&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;/span&gt;
&lt;span class="cp"&gt;&amp;lt;!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;plist&lt;/span&gt; &lt;span class="na"&gt;version=&lt;/span&gt;&lt;span class="s"&gt;"1.0"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;dict&amp;gt;&lt;/span&gt;

    &lt;span class="c"&gt;&amp;lt;!-- 1. Unique identifier for this job --&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;key&amp;gt;&lt;/span&gt;Label&lt;span class="nt"&gt;&amp;lt;/key&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;string&amp;gt;&lt;/span&gt;com.yourname.dailyscript&lt;span class="nt"&gt;&amp;lt;/string&amp;gt;&lt;/span&gt;

    &lt;span class="c"&gt;&amp;lt;!-- 2. Command to run — always use absolute paths for the interpreter AND the script --&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;key&amp;gt;&lt;/span&gt;ProgramArguments&lt;span class="nt"&gt;&amp;lt;/key&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;array&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;string&amp;gt;&lt;/span&gt;/usr/bin/python3&lt;span class="nt"&gt;&amp;lt;/string&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;string&amp;gt;&lt;/span&gt;/Users/yourname/projects/my_script.py&lt;span class="nt"&gt;&amp;lt;/string&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/array&amp;gt;&lt;/span&gt;

    &lt;span class="c"&gt;&amp;lt;!-- 3. Working directory — prevents "file not found" errors inside your script --&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;key&amp;gt;&lt;/span&gt;WorkingDirectory&lt;span class="nt"&gt;&amp;lt;/key&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;string&amp;gt;&lt;/span&gt;/Users/yourname/projects&lt;span class="nt"&gt;&amp;lt;/string&amp;gt;&lt;/span&gt;

    &lt;span class="c"&gt;&amp;lt;!-- 4. Environment variables — launchd starts with a minimal PATH, so declare it explicitly --&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;key&amp;gt;&lt;/span&gt;EnvironmentVariables&lt;span class="nt"&gt;&amp;lt;/key&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;dict&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;key&amp;gt;&lt;/span&gt;PATH&lt;span class="nt"&gt;&amp;lt;/key&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;string&amp;gt;&lt;/span&gt;/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin&lt;span class="nt"&gt;&amp;lt;/string&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/dict&amp;gt;&lt;/span&gt;

    &lt;span class="c"&gt;&amp;lt;!-- 5. Schedule: Monday (1) through Friday (5) at 18:30 --&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;key&amp;gt;&lt;/span&gt;StartCalendarInterval&lt;span class="nt"&gt;&amp;lt;/key&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;array&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dict&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;key&amp;gt;&lt;/span&gt;Weekday&lt;span class="nt"&gt;&amp;lt;/key&amp;gt;&amp;lt;integer&amp;gt;&lt;/span&gt;1&lt;span class="nt"&gt;&amp;lt;/integer&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;key&amp;gt;&lt;/span&gt;Hour&lt;span class="nt"&gt;&amp;lt;/key&amp;gt;&amp;lt;integer&amp;gt;&lt;/span&gt;18&lt;span class="nt"&gt;&amp;lt;/integer&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;key&amp;gt;&lt;/span&gt;Minute&lt;span class="nt"&gt;&amp;lt;/key&amp;gt;&amp;lt;integer&amp;gt;&lt;/span&gt;30&lt;span class="nt"&gt;&amp;lt;/integer&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dict&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dict&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;key&amp;gt;&lt;/span&gt;Weekday&lt;span class="nt"&gt;&amp;lt;/key&amp;gt;&amp;lt;integer&amp;gt;&lt;/span&gt;2&lt;span class="nt"&gt;&amp;lt;/integer&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;key&amp;gt;&lt;/span&gt;Hour&lt;span class="nt"&gt;&amp;lt;/key&amp;gt;&amp;lt;integer&amp;gt;&lt;/span&gt;18&lt;span class="nt"&gt;&amp;lt;/integer&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;key&amp;gt;&lt;/span&gt;Minute&lt;span class="nt"&gt;&amp;lt;/key&amp;gt;&amp;lt;integer&amp;gt;&lt;/span&gt;30&lt;span class="nt"&gt;&amp;lt;/integer&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dict&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dict&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;key&amp;gt;&lt;/span&gt;Weekday&lt;span class="nt"&gt;&amp;lt;/key&amp;gt;&amp;lt;integer&amp;gt;&lt;/span&gt;3&lt;span class="nt"&gt;&amp;lt;/integer&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;key&amp;gt;&lt;/span&gt;Hour&lt;span class="nt"&gt;&amp;lt;/key&amp;gt;&amp;lt;integer&amp;gt;&lt;/span&gt;18&lt;span class="nt"&gt;&amp;lt;/integer&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;key&amp;gt;&lt;/span&gt;Minute&lt;span class="nt"&gt;&amp;lt;/key&amp;gt;&amp;lt;integer&amp;gt;&lt;/span&gt;30&lt;span class="nt"&gt;&amp;lt;/integer&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dict&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dict&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;key&amp;gt;&lt;/span&gt;Weekday&lt;span class="nt"&gt;&amp;lt;/key&amp;gt;&amp;lt;integer&amp;gt;&lt;/span&gt;4&lt;span class="nt"&gt;&amp;lt;/integer&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;key&amp;gt;&lt;/span&gt;Hour&lt;span class="nt"&gt;&amp;lt;/key&amp;gt;&amp;lt;integer&amp;gt;&lt;/span&gt;18&lt;span class="nt"&gt;&amp;lt;/integer&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;key&amp;gt;&lt;/span&gt;Minute&lt;span class="nt"&gt;&amp;lt;/key&amp;gt;&amp;lt;integer&amp;gt;&lt;/span&gt;30&lt;span class="nt"&gt;&amp;lt;/integer&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dict&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;dict&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;key&amp;gt;&lt;/span&gt;Weekday&lt;span class="nt"&gt;&amp;lt;/key&amp;gt;&amp;lt;integer&amp;gt;&lt;/span&gt;5&lt;span class="nt"&gt;&amp;lt;/integer&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;key&amp;gt;&lt;/span&gt;Hour&lt;span class="nt"&gt;&amp;lt;/key&amp;gt;&amp;lt;integer&amp;gt;&lt;/span&gt;18&lt;span class="nt"&gt;&amp;lt;/integer&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;key&amp;gt;&lt;/span&gt;Minute&lt;span class="nt"&gt;&amp;lt;/key&amp;gt;&amp;lt;integer&amp;gt;&lt;/span&gt;30&lt;span class="nt"&gt;&amp;lt;/integer&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/dict&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/array&amp;gt;&lt;/span&gt;

    &lt;span class="c"&gt;&amp;lt;!-- 6. Persistent log files — use ~/Library/Logs, NOT /tmp (which gets wiped by macOS) --&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;key&amp;gt;&lt;/span&gt;StandardOutPath&lt;span class="nt"&gt;&amp;lt;/key&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;string&amp;gt;&lt;/span&gt;/Users/yourname/Library/Logs/dailyscript.out&lt;span class="nt"&gt;&amp;lt;/string&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;key&amp;gt;&lt;/span&gt;StandardErrorPath&lt;span class="nt"&gt;&amp;lt;/key&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;string&amp;gt;&lt;/span&gt;/Users/yourname/Library/Logs/dailyscript.err&lt;span class="nt"&gt;&amp;lt;/string&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;/dict&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/plist&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Understanding the Key Fields
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Key&lt;/th&gt;
&lt;th&gt;What it does&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Label&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Unique name used to identify and manage the job&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;ProgramArguments&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Exact command and arguments — equivalent to typing in your terminal&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;WorkingDirectory&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Sets the &lt;code&gt;pwd&lt;/code&gt; inside your script; prevents relative path failures&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;EnvironmentVariables&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Injects env vars — critical because &lt;code&gt;launchd&lt;/code&gt; starts with a barebones &lt;code&gt;$PATH&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;StartCalendarInterval&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Defines the schedule; &lt;code&gt;0&lt;/code&gt; and &lt;code&gt;7&lt;/code&gt; are both Sunday&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;StandardOutPath&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Where &lt;code&gt;print()&lt;/code&gt; and &lt;code&gt;stdout&lt;/code&gt; output goes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;StandardErrorPath&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Where errors and tracebacks go&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Why &lt;code&gt;~/Library/Logs/&lt;/code&gt; instead of &lt;code&gt;/tmp/&lt;/code&gt;?&lt;/strong&gt;&lt;br&gt;
macOS periodically cleans &lt;code&gt;/tmp/&lt;/code&gt; — sometimes as frequently as on every reboot. If you put your logs there, you could lose them before you ever read them. &lt;code&gt;~/Library/Logs/&lt;/code&gt; is the macOS convention for persistent, user-level logs.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Activating the Job (The Modern Way)
&lt;/h2&gt;

&lt;p&gt;Historically, most tutorials teach &lt;code&gt;launchctl load&lt;/code&gt;, but Apple considers this legacy. The modern, recommended way to register a LaunchAgent for your user session is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Register the job&lt;/span&gt;
launchctl bootstrap gui/&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;id&lt;/span&gt; &lt;span class="nt"&gt;-u&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt; ~/Library/LaunchAgents/com.yourname.dailyscript.plist

&lt;span class="c"&gt;# To test it immediately without waiting for the scheduled time&lt;/span&gt;
launchctl start com.yourname.dailyscript

&lt;span class="c"&gt;# If you edit the plist, you must unload and reload it&lt;/span&gt;
launchctl bootout gui/&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;id&lt;/span&gt; &lt;span class="nt"&gt;-u&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt; ~/Library/LaunchAgents/com.yourname.dailyscript.plist
launchctl bootstrap gui/&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;id&lt;/span&gt; &lt;span class="nt"&gt;-u&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt; ~/Library/LaunchAgents/com.yourname.dailyscript.plist
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Common &lt;code&gt;launchd&lt;/code&gt; Gotchas
&lt;/h2&gt;

&lt;p&gt;If your script isn't running, it is almost certainly one of these:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Barebones &lt;code&gt;$PATH&lt;/code&gt;&lt;/strong&gt; — &lt;code&gt;launchd&lt;/code&gt; starts with a minimal environment. If your script calls &lt;code&gt;python&lt;/code&gt;, &lt;code&gt;node&lt;/code&gt;, or any Homebrew tool by name without a full path, it will silently fail. Always declare your &lt;code&gt;PATH&lt;/code&gt; explicitly in &lt;code&gt;EnvironmentVariables&lt;/code&gt;, and on Apple Silicon Macs include &lt;code&gt;/opt/homebrew/bin&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Absolute paths everywhere&lt;/strong&gt; — &lt;code&gt;launchd&lt;/code&gt; does not expand &lt;code&gt;~&lt;/code&gt;. Use &lt;code&gt;/Users/yourname/&lt;/code&gt; literally everywhere — in &lt;code&gt;ProgramArguments&lt;/code&gt;, &lt;code&gt;WorkingDirectory&lt;/code&gt;, and log paths.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Scripts fail silently&lt;/strong&gt; — There is no terminal window to show you errors. Always check your log files after the first run:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; ~/Library/Logs/dailyscript.err
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Verify the job is registered&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;launchctl list | &lt;span class="nb"&gt;grep &lt;/span&gt;com.yourname.dailyscript
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;The three columns are: PID (blank if not running), last exit code (0 = success), and label.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Stream live system logs&lt;/strong&gt; for deeper debugging:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;log stream &lt;span class="nt"&gt;--predicate&lt;/span&gt; &lt;span class="s1"&gt;'subsystem == "com.apple.launchd"'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  A Quick Note on &lt;code&gt;KeepAlive&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;As you explore &lt;code&gt;launchd&lt;/code&gt; further, you will encounter &lt;code&gt;&amp;lt;key&amp;gt;KeepAlive&amp;lt;/key&amp;gt;&lt;/code&gt;. Setting it to &lt;code&gt;&amp;lt;true/&amp;gt;&lt;/code&gt; tells &lt;code&gt;launchd&lt;/code&gt; to treat your script as a permanent background daemon — if it crashes or exits, &lt;code&gt;launchd&lt;/code&gt; will immediately restart it. This is exactly what you want for a persistent web server, but completely wrong for a daily scraper that is supposed to run once and exit.&lt;/p&gt;




&lt;h2&gt;
  
  
  What About Windows?
&lt;/h2&gt;

&lt;p&gt;Windows has its own built-in equivalent: &lt;strong&gt;Task Scheduler&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;To enable the same "catch-up on wake" behavior:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open &lt;strong&gt;Task Scheduler&lt;/strong&gt; and create a new task.&lt;/li&gt;
&lt;li&gt;Set your trigger (daily, weekly, etc.).&lt;/li&gt;
&lt;li&gt;Go to the &lt;strong&gt;Settings&lt;/strong&gt; tab.&lt;/li&gt;
&lt;li&gt;Check &lt;strong&gt;"Run task as soon as possible after a scheduled start is missed"&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That single checkbox gives you the same sleep-safe behavior as &lt;code&gt;launchd&lt;/code&gt;'s &lt;code&gt;StartCalendarInterval&lt;/code&gt;. Windows also supports environment variables and working directory settings under the task's &lt;strong&gt;Actions&lt;/strong&gt; configuration.&lt;/p&gt;




&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;cron&lt;/code&gt; is a classic for a reason — simple, powerful, and universal. But it was built for servers that never sleep. If you are building personal automation on a laptop, you owe it to yourself to use the scheduler your OS was actually designed around.&lt;/p&gt;

&lt;p&gt;Your data (and your sanity) will thank you.&lt;/p&gt;

</description>
      <category>automation</category>
      <category>productivity</category>
      <category>systems</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
