Search by

jaizendra-netizen / send-window-planner

onegtmlab

PHP CLI and library: plan UTC send slots so every contact gets your email at the same local hour, from a CSV of contacts and UTC offsets.

Package info

github.com/jaizendra-netizen/send-window-planner

Homepage

Type:project

pkg:composer/jaizendra-netizen/send-window-planner

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.0 2026-11-28 22:39 UTC

This package is not auto-updated.

Last update: 2026-11-29 21:04:20 UTC


README

PHP command line tool and library. Give it a CSV of contacts with their UTC offset and the local clock hour you want each email to land, and it works out the UTC time to send to each contact: the local hour minus the offset, wrapped into 0-24 hours, with minutes supported (an offset of 5.5 gives a :30 slot). It groups contacts by UTC send slot, sorted by time, so you can load one batch per slot into your sending tool.

Part of the OneGTMLab free GTM tools. Background on the idea: marketing automation.

Install

composer require jaizendra-netizen/send-window-planner

Use

CSV columns: contact, utc_offset (hours, for example -5 or 5.5). The local hour defaults to 9 and is set with --local-hour (0 up to, not including, 24; 9.5 means 09:30). Offsets must be from -12 to 14: anything else stops the run with an error naming the line and exits 1. Time zone names and daylight saving are not looked up, so give the offset that applies on the send day. The output lists each slot with its contact count and ids, then the total contacts and the number of slots.

$ php bin/send-window-planner sample.csv --local-hour 9
00:00 UTC  1 contact   c09
03:30 UTC  2 contacts  c07, c08
08:00 UTC  2 contacts  c05, c06
09:00 UTC  1 contact   c04
12:30 UTC  1 contact   c10
14:00 UTC  2 contacts  c01, c02
17:00 UTC  1 contact   c03
21:00 UTC  1 contact   c11
total contacts: 11
slots: 8

Test

php tests/run.php

Offline, no network calls, no dependencies beyond the language runtime. MIT licensed.