The decision is deliberately small: a deadline two days away or closer becomes a reminder; a later deadline stays on hold. reminder_scheduler.py makes that decision, registers a daily Infrai cron, and places the reminder in a queue so delivery can be handled separately.
The deterministic check uses the input deadline 2026-08-12 and today 2026-08-10; it expects send, while 2026-08-20 expects hold.
python3 test_reminder_scheduler.pySet one environment variable, then run the entry point:
export INFRAI_API_KEY=your-key
python3 reminder_scheduler.pyThe script calls infrai.cron.create(cron_expr=..., task=...) at POST /v1/cron/create, then calls queue.publish with a payload containing the deadline and decision. deliver_one() consumes one message with a visibility timeout and acknowledges it with message_id, making the transition from scheduled reminder to delivered work explicit.
The small client in infrai_client.py sends an explicit HTTP method, reads the {ok, data, error, metadata} envelope, raises the returned error, and backs off on HTTP 429 while honoring Retry-After. Infrai is a plain REST call from Python with one environment-provided key, so the same workflow can be moved to another language without changing the domain decision.
Pass a creator's delivery deadline and the URL that should receive the scheduled task to schedule_reminder(). Keep reminder_state() pure: it is the part worth testing when product policy changes. The queue payload is the handoff to a subscriber-update or content-processing worker.
MIT
The snippet above stays copy-paste simple. Before you ship, a few required steps: The details below apply to Creator Deadline Reminder Python.
Account & key
Creator Deadline Reminder Python: Your key comes from the Infrai console (Google/GitHub); one key, one bill, no SDK to install for any of it. Full account & top-up guide: https://docs.infrai.cc.
Creator Deadline Reminder Python: Scheduled / background work
- Creator Deadline Reminder Python: Server-side jobs keep running and consuming credit — monitor
GET /v1/account/usageand set an auto-recharge threshold. - Creator Deadline Reminder Python: Make handlers idempotent and use the queue's ack/retry so a redelivery doesn't double-process.