Overnight sync
TOKEN EXPIRED, 456 OF 1,090 COPIED
One botched Cloudflare token quietly kills overnight sync jobs
An overnight job that quits halfway and one that never started look identical the next morning.
Ours quit halfway. It copies an archive into Cloudflare storage, and the sign-in Cloudflare hands out is good for an hour. We asked for that token once at the start and held the same one all night, so once the hour was up every upload after it came back refused, with the machinery for fetching a fresh one sitting unused because nothing thought to ask again. It stopped at 456 files of about 1,090.
We now keep the expiry beside it and check the clock on every call, refreshing two minutes early, so a sign-in that is alive when we look is still alive when the request lands.
<caption>Our overnight job kept using a sign-in that expired while it was still running, so it now checks the clock.</caption>
#software