
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.
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.
Yeah I still code, but for landing pages, portfolios, and marketing sites?
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.
Cron has been around on Unix-like systems for decades, and the basic idea is still everywhere: run a command when a schedule says it should run.
What is Cron?
Cron is a time-based job scheduler used on Unix-like systems. A background service reads schedules—commonly stored in crontab files—and starts commands when their scheduled time arrives.
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
Traditional cron uses a compact five-field schedule followed by the command you want to run. The schedule is usually edited with tools such as crontab:
# minute hour day-of-month month day-of-week command
# | | | | |
* * * * * /home/sloth/scripts/make_newsletter.sh
# minute: 0-59
# hour: 0-23
# day-of-month: 1-31
# month: 1-12
# day-of-week: commonly 0-7, where 0 and 7 mean SundayThis 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.shThe syntax might take a little bit to learn, but check this resource out if you want to play with it:
Why Cron Jobs Matter
Repeatable automation: Scheduled jobs don’t depend on someone remembering to click a button.
Off-hours work: Run maintenance or batch jobs when traffic is lower—if that actually makes sense for the workload.
Periodic checks: Run health checks, cleanup, reports, and other recurring tasks on a predictable cadence.
Modern Alternatives
The cron scheduling idea shows up in plenty of modern systems, but the implementation may be a managed scheduler, workflow platform, serverless trigger, or CI/CD service instead of a Unix cron daemon.
For application workflows, managed schedulers are often easier to observe and operate than a crontab sitting quietly on one server.
GitHub Actions scheduled workflows
Vercel Cron Jobs
AWS EventBridge Scheduler, Google Cloud Scheduler, Azure scheduling services, and similar cloud tools
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 scheduled job is boring and observable, not forgotten. Log failures, alert when critical jobs don’t run, and think about a few classic cron traps:
Environment: cron jobs often run with a smaller
PATHand different environment variables than your interactive shell.Time zones: know which time zone the scheduler uses, especially around daylight-saving changes.
Overlapping runs: if a job takes longer than its interval, another copy may start before the first finishes.
Retries and idempotency: decide what happens after failure and whether running the same job twice is safe.
Monitoring: a backup job that silently fails every night is not a backup strategy—it’s performance art.
If you want to keep learning
Command line for beginners — the shell basics behind traditional cron and crontab workflows.
CI/CD explained — how modern automation pipelines handle scheduled and event-driven jobs.
Cloud computing explained — where managed schedulers and serverless jobs fit in modern infrastructure.


Thanks for the feedback!



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 = 4Reply 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?
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.







