Shared Hosting Survival Kit

Two patterns that keep a real ~1,000-page PHP site alive on shared cPanel hosting - no shell, no SSH, no cron. Everything below runs in your browser as a simulation of the production pattern. Code: lazy-cron · guarded-deploy-workers

Demo 1 · The self-verifying deploy worker

artist.php - production file
Scenario

A worker is one PHP file uploaded to the web root and hit with a secret token. Pick a scenario and run it - the abort and rollback paths are the feature.

Worker output

Demo 2 · Cron-less scheduled jobs (lazy-cron)

Simulated server clock
00:00:00
requests: 0 · jobs claimed: 0 · lock skips: 0

Every simulated request passes the job queue. The first request after a window opens claims it with one conditional UPDATE; concurrent requests hit the lock and move on. Fast-forward to see idle traffic self-heal a missed window.

Request log