SShortSingh.
Back to feed

Cron Triggers Jobs Without Queuing Them: Four Scheduling Myths and a Run Wrapper

0
·5 views

A developer found that cron fires processes on schedule but does not queue them, check whether prior runs have finished, or retry failed or missed runs. Overlapping jobs can therefore run concurrently and write to the same files. The article proposes a standard-library Python wrapper that uses a non-blocking file lock to skip overlapping runs with exit code 75, enforces a deadline, and records each state change in a JSONL ledger. It also advises setting cron schedules explicitly in UTC to avoid timezone and DST surprises. The author argues that a completion record is more reliable than a process exit code or a cron schedule when verifying that work actually happened.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Setting up blog-kit to publish to dev.to with a built-in leak check

The author uses blog-kit, a small Python tool for publishing to the dev.to API, to post articles, render diagrams, and make cover images. Its key feature is a leak check that scans drafts for private IP ranges, API keys, and password-style secrets, refusing to publish even on a dry run. Every run is a dry run unless the --publish flag is passed, and the tool needs only Python 3 and its standard library. After publishing, it reads the article back from dev.to to confirm the published_at timestamp, since the API's create response shows published: null even on success. The guide also covers rendering SVG diagrams with librsvg and using white backgrounds so they remain visible in dev.to's dark mode.

0
ProgrammingDEV Community ·

UnimeType Releases Open-Source 0.8B and 4B Models for Mixed-Script Transliteration

UnimeType has open-sourced its Transliteration 2.0 models in 0.8B and 4B sizes under the Apache-2.0 license. The models convert phonetic Latin input into native scripts while keeping English words, code identifiers, and URLs in Latin script. They target bilingual writers using Pinyin, Romaji, Hinglish, Arabizi, and Russian transliteration alongside English. The team says existing IMEs force layout toggling and general LLM translators collapse mixed input into one language, so the models were built for sub-second, output-only inference. Both models are fine-tuned on Qwen3.5 and are also available as browser converters.

0
ProgrammingDEV Community ·

Research on AI coding assistants shows mixed productivity results across studies

Studies on AI coding assistants do not agree on a single productivity figure. A 2022 GitHub experiment found developers completed a clearly specified HTTP server task 55% faster with Copilot. A field experiment across thousands of workers reported about a 26% rise in completed tasks, with less experienced developers gaining the most. A METR randomised trial, however, found experienced developers working in large codebases they already maintained took 19% longer with AI, even though they believed it had sped them up. Google's DORA research links AI adoption to higher team throughput but a negative effect on delivery stability.

0
ProgrammingDEV Community ·

AWS Adds Regional Origin Signal to Direct Connect Routes via BYOASN

AWS has published a walkthrough of Bring Your Own ASN (BYOASN), a feature of Amazon VPC IP Address Manager that lets providers attach a distinct public ASN to each AWS Region. The approach addresses cases like a Zurich customer whose Direct Connect circuit at ZUR1 receives routes from the Frankfurt Region, which falls under a different regulatory jurisdiction. Because the Region-specific ASN appears as the origin AS in the BGP path, customers can write a single import policy scoped to approved origins instead of maintaining fragile prefix lists. The setup requires an IPAM with public scope, a registered BYOIP range, a public ASN with a valid ROA, and a public virtual interface peering with ASN 7224. The post was published on 3 November 2026.