A cleanup you watch is a different program from a cleanup on a schedule. Same query. Same mailbox. What changes is that nobody is there when the second one runs.
I added scheduled runs to my Gmail cleaner. Most of that work turned out to have nothing to do with deleting mail.
Somebody was catching your bad matches and you never noticed
Run a bulk delete by hand and you watch the count land. Two thousand four hundred, fine. Nineteen thousand, and your hand comes off the mouse before you finish reading the number.
That pause is a safety control. Nobody wrote it down. It is not in the code anywhere, and it vanishes the moment a run happens at 4am on a Tuesday while the one person who would have flinched at that number is asleep.
So the first question for a scheduled job is not how to schedule it, it is what the job should do when a result looks wrong. Remember what "looks wrong" used to mean. A human squinting at a number.
So what replaces the squint?
Daily does not mean daily
Browser extensions get no cron daemon. An alarm fires while the browser is running, so your daily job really runs the next time somebody opens Chrome. Work Monday to Friday, shut the laptop on Saturday, and your daily job runs five times a week.
Now the interesting part. Three runs were missed. Does the job catch up?
Say it does. A rule that quietly matches a few hundred messages a day now fires against three days at once, and the run that stayed small every time anyone watched it becomes the biggest this mailbox has seen. Say it does not. The mailbox drifts and the tool looks broken.
Neither answer is free, and picking one is the actual design decision hiding inside a checkbox that says "run this daily". Skipping is the safer default, and it has to be visible, because silent skipping is how somebody ends up believing a cleanup ran all month when it never did.
A schedule turns the query into the whole product
An interactive run repairs its own mistakes. You see 19,000, you narrow the filter, you go again. A bad first draft never survives.
A scheduled run gets no second draft. The query you wrote on Sunday executes against a mailbox that keeps changing under it for months. Somebody subscribes to a newsletter matching your sender pattern. A vendor switches the From address on receipts you meant to keep. The rule did not change. Its blast radius did.
Which rules survive that? Ones that state their exclusions rather than only their matches. An unattended rule is worth exactly what its exceptions are worth, and those exceptions belong inside the query instead of in the operator's head. At 4am there is no operator.
Cap the run, then tell somebody
What makes an unattended delete survivable? Two things.
First, a per-run ceiling, so a rule that suddenly matches ten times its usual volume hits the ceiling instead of the mailbox. You do not add a cap because you expect the spike, you add it because the entire premise of scheduling is that you are not watching.
Second, a record you read afterwards: the query, the number of messages actually acted on rather than matched, the time it ran, whatever it skipped and why. A scheduled feature with no report is a rumour that your inbox is being cleaned.
What I actually shipped
The extension is Bulk Delete Gmail Emails, also called Gmail One-Click Cleaner: Chrome Web Store listing.
Per that listing it runs scheduled cleanups daily, weekly or monthly. A run can be live. It can also be a review pass, or a dry run that touches nothing.
Those modes are doing the work described above. A dry run answers the "how wrong is this rule" question before the rule is ever trusted alone. Review keeps a person in the loop for the first few passes, which is where you find the exception you forgot about.
There is a recovery log too, with one-click restore for roughly thirty days. That is the backstop for a run nobody watched, and it ticks along on the same clock Gmail's own Trash uses.
The limit, said plainly
A recovery log is a thirty-day window rather than a backup. If a scheduled rule has been quietly eating something you wanted for five weeks, the log cannot help you. Neither can Gmail.
Which is the argument for aiming a schedule only at mail you have already decided against. Promotional mail from senders you unsubscribed from months ago. Notifications out of a system you left. Categories where the worst case is a shrug.
The exciting version of this feature is a rule that learns what you ignore and clears it for you. I did not build that one, and I am not going to. Unattended and clever make a bad pair when the failure mode is somebody's mail.
Top comments (0)