惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Apple Machine Learning Research
Apple Machine Learning Research
Jina AI
Jina AI
博客园_首页
WordPress大学
WordPress大学
罗磊的独立博客
小众软件
小众软件
Last Week in AI
Last Week in AI
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Hugging Face - Blog
Hugging Face - Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
爱范儿
爱范儿
The Cloudflare Blog
GbyAI
GbyAI
C
Check Point Blog
腾讯CDC
MyScale Blog
MyScale Blog
有赞技术团队
有赞技术团队
博客园 - 聂微东
IT之家
IT之家
雷峰网
雷峰网
H
Help Net Security
博客园 - 叶小钗
美团技术团队
D
DataBreaches.Net

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Your Python cron jobs are failing silently. Here's how to...
Mike Tickste · 2026-05-12 · via DEV Community

Mike Tickstem

If you're running a Python app on Vercel, Railway, Render, or Fly.io, you've run into this - there's no persistent process, so you can't use cron, APScheduler, or Celery workers the traditional way.
Most developers end up using the platform's built-in scheduled tasks — which work fine until they silently stop running and nobody notices for three days.

I built Tickstem to solve this, and just shipped a Python SDK.

The silent failure problem

Here's the thing about cron jobs: they fail in two ways.

Loud failures — the job runs, your endpoint returns 500, you get an alert. Fine.

Silent failures — the job never runs at all. Maybe a deployment broke something, maybe a config changed. The endpoint is healthy, no errors anywhere, but the job just... stopped. You find out when a user asks why their weekly report didn't arrive.

The second type is what kills you. Uptime monitoring doesn't catch it because your server is up. Error tracking doesn't catch it because there's no error. You need a dead man's switch.

Install

pip install tickstem

Requires Python 3.11+. One package, one API key, four tools.

Scheduling cron jobs

Instead of running a scheduler inside your app, Tickstem calls your HTTP endpoint on a schedule from outside:

from tickstem import CronClient, CronRegisterParams                                                                                                                                                                                                         

client = CronClient(os.environ["TICKSTEM_API_KEY"])

job = client.register(CronRegisterParams(
      name="send-weekly-report",
      schedule="0 9 * * 1",  # every Monday at 9am UTC
      endpoint="https://yourapp.com/jobs/weekly-report",
))  

Enter fullscreen mode Exit fullscreen mode

Your endpoint just needs to return 2xx. No SDK needed on the receiving side — it's just an HTTP call. This means it works on any serverless platform without touching your app's runtime.

The dead man's switch (heartbeat monitoring)

This is the part that actually solves the silent failure problem. Your job sends a ping after every successful run:

from tickstem import HeartbeatClient, HeartbeatCreateParams                                                                                                                                                                                                 

client = HeartbeatClient(os.environ["TICKSTEM_API_KEY"])

# Create once, save the token                                                                                                                                                                                                                               
hb = client.create(HeartbeatCreateParams(
      name="weekly-report",
      interval_secs=604800,  # expect a ping every 7 days
      grace_secs=3600,       # 1 hour buffer before alerting
))

# At the end of your job handler:                                                                                                                                                                                                                           
try:                                                      
      client.ping(hb.token)  # no API key needed — token is the credential
except Exception as e:
      logging.warning(f"heartbeat ping failed: {e}")  # non-fatal

Enter fullscreen mode Exit fullscreen mode

If pings stop arriving within the window, you get an email. That's it. The ping endpoint doesn't require your API key — just the token — so you can call it safely from any context.

Uptime monitoring

While you're at it, monitor your actual endpoints too:

from tickstem import UptimeClient, UptimeCreateParams, Assertion

client = UptimeClient(os.environ["TICKSTEM_API_KEY"])

monitor = client.create(UptimeCreateParams(
      name="Production API",
      url="https://api.yourapp.com/health",
      interval_secs=60,
      assertions=[
          Assertion(source="status_code", comparison="eq", target="200"),                                                                                                                                                                                     
          Assertion(source="response_time", comparison="lt", target="2000"),
      ],
))

Enter fullscreen mode Exit fullscreen mode

Assertions let you define what "healthy" actually means — not just that the server responded, but that it responded correctly and fast enough.

Email verification

One more thing in the bundle — validate email addresses before storing them:

from tickstem import VerifyClient                                                                                                                                                                                                                           

client = VerifyClient(os.environ["TICKSTEM_API_KEY"])

result = client.verify("user@example.com")
if not result.valid:
    raise ValueError(f"Email rejected: {result.reason}")
if result.disposable:
    raise ValueError("Disposable email addresses are not allowed.")

Enter fullscreen mode Exit fullscreen mode

Checks syntax, MX records, 200+ disposable domains, and role-based prefixes (admin@, noreply@, etc). No SMTP probing.

One API key for everything

All four tools share one API key and one plan. Free tier includes 1,000 cron executions, 5 uptime monitors, 5 heartbeats, and 500 email verifications per month.

pip install tickstem

GitHub: https://github.com/tickstem/python
Docs: https://tickstem.dev/docs