Nov 30 report → Login ends by Dec 2
Dec 1 run → Stopped after 14 seconds, nothing made
The fix → A check that reads the end date before the job
Our nightly AI job writes me a report every night. On November 30 the report said the tool's login would end by December 2. The next night the login had ended, and the job stopped after 14 seconds. It made nothing.
The warning was right. It just went to a person, and the job had no way to act on it. So I wrote a check the job can run for itself before it starts.
If anything in your business runs on its own, a backup, a report, an AI task that works overnight, this is a small fix worth doing.
The warning was in my own report
Every night at 9 pm a script on a Mac in our office starts an AI job that builds a blog post and a short video, then writes a summary for me. Item 5 on the November 30 summary:

That's a clear warning with a date and the fix. It also landed in a list of five things to look at, written late at night, for a person to read the next day.
The next night
Here is the job's own log for December 1:

Started at 21:00:04. Finished at 21:00:18. Fourteen seconds, no post, no video, no report. The tool's own output file shows why:

The tool warned too, one line above the error. Two warnings, both correct, both in places a person reads later. The job read neither.
The log line also says "exit 0," which normally means everything went fine. That's a separate bug in how our log saves the exit code, and the time limit post covers it.
The end date is written down
A login for a tool like this has an end date. The tool will tell you what it is if you ask:

That last line is the exact date and time the current login ends. Right now it says January 1, 2027. If the job can read that line, the job can warn itself.
The check that runs first
I wrote a short script that runs before the job. It does three things:
- Asks the tool for its login status.
- Reads the end date and works out the days left.
- If the login is missing or ends in under three days, it stops and prints why, before any work starts. Otherwise it says OK.
I ran it twice on December 3. Once for real, and once pretending it was December 30, two days before the end date:

The real run shows 28.3 days left and says start the job. The pretend run shows 1.3 days left, says STOP, and exits with code 2, which a script can act on.
Three days is a choice, not a rule. It gives me a weekday or two to renew, even if a warning lands on a Friday night.
Where it goes next
The check is written and tested, but it isn't wired into the nightly job yet. I'm not changing the script that starts the job while that job is running, so the change is written up as a proposal for me to apply by day. Until then, the new end date, January 1, 2027, is at the top of my nightly report.
The other half of the fix is where a STOP goes. A failure that only reaches a log file is the same as no failure. It needs to land somewhere I read every day, which is the same lesson as the automation that failed quietly.
How to set this up for your own jobs
- List every login, token and key each scheduled job needs. Email, cloud storage, your AI tool, your social scheduler.
- Find where each end date lives. A status command, the account page, or the email you got when you made the key. Write the date next to the job.
- Add a check before the job starts that reads the login status and the end date.
- Stop early and say why if the login is missing or ends within a few days. Send that message somewhere a person reads daily.
- Test the check with a pretend later date or a date that has already passed. It should stop.
- When you renew, write down the new end date and run the check again.
Many tools also offer a longer lasting token made for unattended jobs. For anything that runs while you sleep, that's usually the better choice than a login made for a person at a keyboard. Never paste the token itself into a report, a log or a screenshot.
What this doesn't show
One job, one tool, one missed night. The check reads one tool's status output, and other tools show their end dates in different places, some only by email. The point isn't this exact script. It's that the date already exists, so the job should read it instead of hoping a person remembers.
If you keep a weekly log of AI mistakes, a missed night like this is exactly the kind of row that tells you what to fix first.
Get the SOPs
SOP 21 in my free pack is this check, step by step, and SOP 16 covers making failures land where you'll see them. Read them on the example AI SOPs page or download the PDF from there.
Sources and local evidence
- The nightly report of November 30, 2026, and the job's log and output files for December 1, 2026.
- The login status and both runs of the check: December 3, 2026, output saved, private fields removed.
- Background photos in the reel: Stefan Lobont on Pexels (https://www.pexels.com/photo/black-flat-screen-computer-monitor-4069064/); Артем Зелюткин on Pexels (https://www.pexels.com/photo/metal-padlock-securing-a-door-latch-37095097/); Natalia S on Pexels (https://www.pexels.com/photo/a-black-and-white-calendar-with-a-pen-on-top-28353121/). The photos set the scene only. Every log and terminal screen in the reel is real output.
Related
- Our AI job had a five hour limit. It ran for twelve.
- Our automation stopped backing up for three days. Nothing told us.
- Write down every AI mistake for a week
Read next: I asked our AI to count our posts. It said 30. The answer was 49.