Daily Snapshot Scheduling and Verdict-Only Credential Verification Automation: A Job That Only Ran When Someone Was Watching

A function that only runs when someone opens a screen is not a scheduled process — it just looks like one
A backend function that correctly produces the right result when invoked can create the impression that the feature it belongs to is "working," especially if the screen that happens to call it is opened regularly enough that the gap goes unnoticed. The difference between that and a genuinely scheduled process is invisible from the outside on any day someone happens to open the right screen — and completely exposed on the first extended stretch where nobody does.
How the underlying problem shows up before you fix it
A backend function that is supposed to run on a regular schedule has no actual scheduled trigger configured for it — its only real invocation path is a person opening a specific screen that happens to call it.
A newly-added scheduled trigger is assumed to work simply because the function it calls already works correctly when invoked some other way, without anyone actually firing the exact request the schedule itself will send and reading the real response.
An authentication check for an internal, machine-to-machine call is designed as a simple equality comparison against a single stored credential, rather than as a decision delegated to whatever system actually issues and rotates that credential.
A verification function, when asked "is this the right credential," returns the actual credential value as part of proving the answer, rather than a plain yes-or-no result.
Execute permission on a sensitive internal function is granted broadly by default and only partially restricted afterward — closing access for one role while leaving a default grant intact for others that were never explicitly revoked.
How Centriu Maestro added the missing schedule, then caught its own new failure before it could repeat the old one
The daily ad-spend snapshot function itself worked correctly whenever it ran — the gap was that nothing ran it on a schedule at all. Other scheduled jobs existed for other parts of Centriu Maestro (a campaign monitor, several report generators), but none of them called this specific function, and a nearby job that DOES run on a real schedule reads a rolling 30-day window even for platforms where that window's day-to-day change is not a meaningful daily figure — the exact mismatch this same fix's reporting-side page describes, meaning that job could not simply be repurposed to cover the gap. The fix adds a dedicated, genuine schedule for the snapshot function itself, timed thirty minutes before the downstream reporting step that depends on its output, so that step always has the current day's snapshot available by the time it runs.
Rather than assume a newly-scheduled job would simply work because the function it calls already did, the very first real run was tested directly — by sending the identical request the schedule itself would send, using the platform's own internal dispatch mechanism, and reading back a genuine, unmodified response. That response was an authentication rejection. The schedule was presenting the current, correct service credential — sourced from the platform's own secure credential store — and the function was comparing it against an environment variable that still held an OLDER credential format, the same category of mismatch responsible for a separate, wider outage described on this pillar's companion page. Caught this way, on a brand-new schedule before it had ever run unnoticed, rather than discovered months later the way the wider version of the same defect was.
Instead of simply updating that one comparison to the current credential value — which would only be correct until the next rotation — the fix moves the entire authentication decision into the database itself, the same place the credential is actually stored and kept current. A dedicated database function accepts a presented credential and returns ONLY a boolean: does this match the current service credential, yes or no. The credential itself never crosses back out of the database as part of that answer. The comparison inside that function is performed on a cryptographic digest of each value rather than on the raw text directly, specifically so that how many leading characters happen to match does not influence anything observable about the comparison. And execute permission on this function is explicitly revoked from the public role, from anonymous access, and from ordinary authenticated users — three separate, explicit revocations, deliberately, because revoking access from only one of those roles would still leave a default grant intact for the others; permission is then granted only to the single internal role that legitimately needs to ask the question.
What is actually built today
A genuine, dedicated schedule for the daily ad-spend snapshot function, timed thirty minutes ahead of the downstream reporting step that depends on its output — not a repurposed schedule from an unrelated job.
A tested first run: the exact request the schedule sends was fired manually and its real response read, rather than assuming a new schedule would work because the underlying function already did.
A dedicated database function that answers only "is this the current service credential?" as a plain boolean — the credential itself is never returned as part of that answer.
A digest-based comparison inside that function, rather than a raw-text comparison, specifically so the outcome does not depend on how many leading characters of a presented value happen to match.
Execute permission on that function explicitly revoked from the public role, from anonymous access, and from ordinary authenticated users, and granted only to the one internal role that needs it — three explicit revocations, not one.
Confirmed today via direct inspection: the snapshot function's authentication block still calls this database verdict function as its check, and the explicit multi-role revocation remains in place.
A schedule tested before it could fail quietly (illustrative scenario, not a real client)
A new schedule is added for a function that has always worked correctly whenever a person's screen visit happened to trigger it. Rather than trust that the schedule will behave the same way, the exact request it will send is fired manually first, and the response is a real authentication rejection — caught immediately, on day one of the new schedule, instead of being discovered months later the way the underlying credential-format mismatch was found elsewhere on the platform.
What changes operationally
Centriu Maestro's daily ad-spend snapshot now runs on a real, dedicated schedule rather than depending on someone opening a specific screen, and the authentication protecting that schedule's own trigger is a database-side yes/no decision that never exposes the credential itself and cannot be bypassed by a role that was never explicitly granted access to ask.
When this is not the right fit
This page covers the scheduling and internal authentication of Centriu Maestro's own snapshot-producing job — it does not describe the correctness of the daily figures that job produces, which is covered separately, or any customer-facing scheduling feature; this is an internal reliability mechanism, not something a client configures.
Trusting a new schedule vs. testing its exact real call
Assuming a newly-added schedule works because the function underneath it already works is a reasonable-sounding shortcut that specifically fails to test the one thing that's actually new — the schedule's own request, sent the way the schedule sends it. Centriu Maestro's approach fires that exact request manually before relying on it, which is precisely how a brand-new authentication gap was caught on day one instead of months later.
Related systems
Main system: Centriu Maestro.
What it does NOT do
- Does not rely on a screen being opened to trigger the daily ad-spend snapshot — a dedicated, genuine schedule now runs it independently of any user action.
- Does not assume a newly-added schedule works correctly without testing it — the exact request the schedule sends was fired manually and its real response confirmed before relying on it.
- Does not return the actual service credential as part of verifying it — the database-side check answers only a plain yes or no.
- Does not compare a presented credential to the stored one as raw text — the comparison is performed on a cryptographic digest of each value specifically to avoid leaking how many characters matched.
- Does not leave execute permission on the credential-verification function open to the public role, anonymous access, or ordinary authenticated users — all three are explicitly revoked, individually, and only one internal role is granted access.
- Does not repurpose an unrelated, already-scheduled job to cover this gap — a nearby job reads data in a way that would have reintroduced the platform-basis mismatch described on this pillar's companion reporting page.
Security and governance
The daily ad-spend snapshot job authenticates its own scheduled trigger through a dedicated database function that returns only a yes/no verdict — never the credential itself — compared by cryptographic digest and restricted to a single internal role via explicit, individual revocation from public, anonymous, and authenticated access. Any personal or business data involved remains subject to Brazil's LGPD (Law No. 13,709/2018). Full detail on access control lives at /governanca and /iso.
Pricing and contracting
Available by monthly subscription, with tiered plans. Values and terms come from the official pricing table at /precos (Centriu's central source — never restated here).
Frequently asked questions
Why did the daily snapshot job go two months without running?
It had no scheduled trigger of its own — its only real invocation path was a person opening a specific screen that happened to call it, which is not the same as a genuine, dependable schedule.
Why not just have the new schedule use an existing, similar job?
A nearby scheduled job reads a rolling time window even for platforms where that window's day-to-day change is not a meaningful daily figure — reusing it would have reintroduced a separate, already-identified data-correctness problem.
How was the authentication failure on the new schedule actually found?
By sending the exact request the schedule itself sends and reading a real, unmodified response — which came back as a genuine authentication rejection, caught on the very first real run rather than assumed to work.
What does the database-side verification function actually return?
A plain boolean — yes or no, is this the current service credential — never the credential value itself, and the comparison is performed on a cryptographic digest rather than the raw text.
Who can call this credential-verification function?
Only one internal role — public, anonymous, and ordinary authenticated access are each explicitly revoked individually, not assumed closed by revoking just one of them.
What does Centriu Maestro cost?
It is sold by subscription with a published starting price — exact current values are on the central pricing page.
See how Centriu Maestro schedules and authenticates its own internal jobs
Reach our commercial team directly, or leave your details below — we'll follow up with guidance for your case.