Logo
Logo
Home
Archive
Advertise
YouTube
Login
Sign Up
  • Home
  • Posts
  • 🦥Cron For Dummies

🦥Cron For Dummies

Aug 5, 2025

Hello friends!

Welcome to this week’s Sloth Bytes. I hope you had a great week 😃

Yeah I could code a landing page, but why would I?

Even with HTML, CSS, Tailwind, and a few AI tools, it still takes hours to make something that works across screen sizes, has good SEO, and doesn’t look like garbage.

I’m also pretty lazy.

That’s why I like Framer.

Framer still gives me full creative control, but it also has other helpful tools to speed up development so I can go back to building.

When you hit publish, it’s live: SEO-optimized, blazingly fast, and fully responsive.

Need beautiful animations? Just drag a slider or click a button.

A/B testing, a real CMS, one-click localization, and integrations with other software.

Framer has it all.

Yeah I still code, but for landing pages, portfolios, and marketing sites?

I’ll just use Framer and save some hours.

Try it for free and since you’re a Sloth Bytes reader you’ll also get a free month of Framer Pro with code CODINGSLOTH2025.

Cron For Dummies

I always wondered how a lot of apps/programs sent weekly reminders and emails.

Did they manually send it every time?

Well… no obviously. Programmers hate the word “manual” with a passion.

If something can be automated, some programmer will figure it out.

And they did.

They created Cron and It’s been running millions of automated tasks since 1975.

What is Cron?

Cron runs commands automatically at specified times:

  • Backup databases every night at 2 AM

  • Send reports every Monday at 9 AM

  • Clean up old files every Sunday

  • Check if your website is up every 5 minutes

The name comes from "chronos" (Greek for time). It's literally Father Time for computers.

The Original Cron

Cron started off as a shell command that uses an interesting syntax to define when tasks should run.

  * * * * * /home/sloth/scripts/make_newsletter.sh
# | | | | |
# | | | | day of the week (0–6) (Sunday to Saturday; 
# | | | month (1–12) 7 is also Sunday on some systems)
# | | day of the month (1–31)
# | hour (0–23)
# minute (0–59)

This was revolutionary for its time!

Computers could finally do things automatically on schedule. System administrators could go home knowing backups would run at 2 AM without them.

Common Examples

# Every day at 2:30 AM
30 2 * * * /backup/daily-backup.sh

# Every Monday at 9 AM
0 9 * * 1 /send/weekly-report.py

# Every 5 minutes  
*/5 * * * * /check/server-health.sh

The syntax might take a little bit to learn, but check this resource out if you want to play with it:

Crontab.guru

An easy to use editor for crontab schedules.

Why Cron Jobs Matter

  • Humans forget, computers don't.

  • Off-hours automation: Run heavy tasks when users aren't active.

  • Consistent monitoring: Health checks and alerts that never sleep.

Modern Alternatives

Cron has evolved over the years to the point where a lot of tools do it automatically for you!

But if you need to do custom workflows/cron jobs you can do that with modern tools instead of using the shell.

  • GitHub Actions

  • Vercel

  • AWS, Google Cloud, Azure, etc

There’s a lot more options…

The Modern Reality

A lot of modern programs depends on scheduled tasks:

  • Email campaigns scheduled for optimal send times

  • Automated nightly backups protecting critical data

  • SSL certificates renewed before expiration

  • Analytics reports compiled and delivered automatically

  • Security scans running during off-peak hours

When Should You Use Cron Jobs?

Some reasons for cron jobs:

  • Database backups and cleanup tasks

  • Log rotation and system maintenance

  • Sending periodic reports or notifications

  • Health checks and monitoring scripts

  • Data synchronization between systems

The best cron job is one you set up once and forget about, until you desperately need the results it's been quietly producing.

Thanks for the feedback!

Introducing gpt-oss

gpt-oss-120b and gpt-oss-20b push the frontier of open-weight reasoning models

Your public ChatGPT queries are getting indexed by Google and other search engines

Search engines are indexing links to ChatGPT conversations that have been made sharable with a link.

Amazon DocumentDB Serverless is now available

Amazon DocumentDB Serverless automatically scales capacity up or down in fine-grained increments based on your application's demand, offering up to 90% cost savings compared to provisioning for peak capacity.

I couldn't submit a PR, so I got hired and fixed it myself

After joining Mintlify (which acquired my previous company), I finally fixed a search bug that had bothered me for over a year as a user.

How Wix Cut 50% of Its Data Platform Costs - Without Sacrificing Performance (Part 1)

In this post, we share the journey of optimizing the data platform at Wix, which led to a 50% reduction in monthly data platform costs.

Thanks to everyone who submitted!

nxrms, HyperUltra96, loonpanda, entenute, AspenTheRoyal, BerryJam8402, RISHI-GAPPIBHAI, gcavelier, shaunak012, RileyWong26, NeoScripter, Suji-droid, and the most interesting one this week a solution in PERL: AI-IS-POWER.

Cinemas

Given an array of seats, return the maximum number of new people which can be seated, as long as there is at least a gap of 2 seats between people.

  • Empty seats are given as 0.

  • Occupied seats are given as 1.

  • Don't move any seats which are already occupied, even if they are less than 2 seats apart. Consider only the gaps between new seats and existing seats.

Examples

maximumSeating([0, 0, 0, 1, 0, 0, 1, 0, 0, 0])
output = 2
# [1, 0, 0, 1, 0, 0, 1, 0, 0, 1] 2 new people were seated!

maximumSeating([0, 0, 0, 0])
output = 2
# [1, 0, 0, 1] 2 new people were seated!

maximumSeating([1, 0, 0, 0, 0, 1])
output = 0
# There is no way to have a gap of at least 2 chairs when adding someone else.

maximumSeating([0, 0, 0, 1, 0, 0, 1, 0, 0, 0])
output = 2

maximumSeating([0, 0, 0, 0, 0, 0, 0, 0, 0, 0])
output = 4

Reply with

  • A link to your solution (github, twitter, personal blog, portfolio, replit, etc)

  • or if you’re on the web version leave a comment!

  • If you want to be mentioned here, I’d prefer if you sent a GitHub link or Replit!

NEW VIDEO!

That’s all from me!

Have a great week, be safe, make good choices, and have fun coding.

If I made a mistake or you have any questions, feel free to comment below or reply to the email!

See you all next week.

What'd you think of today's email?

  • 🦥 Amazing! Keep it up
  • 🦥 Good, not great
  • 🦥 It sucked

Login or Subscribe to participate

Want to advertise in Sloth Bytes?

If your company is interested in reaching an audience of developers and programming enthusiasts, you may want to advertise with us here.

Reply

Avatar

or to participate

Keep Reading

envelope-simple

Join 50k+ developers and become a better programmer and stay up to date in just 5 minutes.

© 2026 Sloth Bytes.
Report abusePrivacy policyTerms of use
beehiivPowered by beehiiv