Disclaimer: This project was completed during Rob’s tenure as the Technical Delivery Director at Astute Communications (2022-). Lee Company was not, and is not, a client of Petrin Development Services.

The Project
The Lee Company, a multi-service home services provider covering HVAC, plumbing, electrical, appliance repair, garage door services, and home improvement, had been operating on a website built around 2019-2020. The platform was sophisticated for its era—utilizing a highly customized Advanced Custom Fields (ACF) setup that functioned essentially as a page builder. However, what was cutting-edge in 2020 had become constraining by 2024.
The site’s fully custom PHP-heavy theme felt more like enterprise software than a modern WordPress build: robust and well-architected, but verbose and opinionated in ways that made simple updates unnecessarily time-consuming. The compilation tools had aged out, and the lack of Gutenberg integration meant the client couldn’t leverage modern visual editing capabilities. It was time for a complete platform rebuild.
As part of Astute’s ongoing marketing engagement with Lee Company, the team manages a constantly rotating roster of promotions across their service lines. Most promotions run on monthly cycles, with some special seasonal or one-time offers mixed in. The manual process was straightforward but tedious: at the end of each month, someone had to remember to unpublish expired promotions and manually update dates for recurring offers. WordPress doesn’t offer scheduled unpublishing natively, and pre-scheduling changes to already-live content isn’t supported without custom development.
The opportunity was clear: automate the monthly promotion lifecycle with a cron-driven system that could handle both one-time and recurring promotions without manual intervention.
The Challenges
- Cron complexity – While not the most difficult WordPress development task, implementing reliable cron functionality sits a level above standard functions.php work or ACF configuration in terms of technical complexity
- WordPress cron reliability – WordPress’s wp-cron is pseudo-cron (it only fires when the site receives traffic), and staging environments can be particularly finicky about executing scheduled events on time
The Process
The Data
Promotions carry several key attributes that drive the automation logic:
Scheduling attributes:
- Start date
- End date
- Renewal behavior (one-time or recurring monthly)
User interaction features:
- “Save for later” capability – end users can email themselves a promotion to review before it expires
- Unlisted status – similar to unlisted YouTube videos, these promotions are accessible via direct URL but don’t appear in the public promotions archive
Form handling:
- Standard contact forms for most promotions
- Alternate forms for specific contexts (like Residential Inside Sales promotions)
- Third-party forms when promotions are co-sponsored with partners (for example, a local sports team partnership that requires using their marketing tools)
Additional metadata:
- Fine print and legal disclaimers
- Dollar value (for promotional offers)
All promotional copy is intentionally kept month-agnostic (avoiding phrases like “November Special”) to support seamless auto-renewal without requiring content updates.
The Development
The project broke into two phases: rebuilding the promotion infrastructure, then layering automation on top.
Phase 1: Promotion System Rebuild
Before automation could happen, the team needed to recreate all existing promotion functionality in the new platform:
- Custom post type for promotions with comprehensive metadata
- Template system for displaying promotions on landing pages
- Form integration handling (standard, alternate, and third-party)
- “Save for later” email functionality
- Unlisted promotion logic
Phase 2: Automation Logic
Once the foundation was in place, implementing the automation rules against the promotion post type was relatively straightforward:
Auto-unpublish (one-time promotions): When a promotion’s end date passes and renewal behavior is set to “one-time,” the post status changes to draft, removing it from public visibility while preserving it for record-keeping.
Auto-renew (recurring promotions): When a promotion’s end date passes and renewal behavior is set to “recurring,” the system updates the start date to the first day of the next month and the end date to the last day of that month, effectively extending the promotion forward.
Cron Implementation
The complexity resided entirely in the cron setup. The system runs daily at 3:00 AM Central Time, checking all active promotions against the current date. For each promotion that has reached its end date, the cron executes the appropriate action based on renewal behavior.
WordPress’s pseudo-cron presented challenges, particularly in staging environments where traffic might not trigger scheduled events reliably. The implementation needed to account for these environmental quirks while maintaining predictable execution in production.

Admin Experience
The WordPress admin list view for promotions was optimized for managing the automated system:
- Sorted by expiration date (showing soonest-to-expire first)
- Columns for start date, end date, and renewal behavior at a glance
- Dedicated logging page showing cron execution history
Logging System
Each cron execution logs:
- Timestamp of the check
- Number of promotions requiring action
- For each action taken: which promotion was affected and what change occurred (unpublished or renewed)
This creates an audit trail for troubleshooting and ensures the team can verify the automation is functioning as expected.
The Finished Product
The automated promotion system launched in December 2025 as part of the broader Lee Company website rebuild. Since the functionality operates entirely in the backend, there’s no flashy frontend demonstration—but the impact on operational efficiency is significant.
The marketing team no longer needs to manually track promotion calendars or remember to unpublish expired offers. Recurring promotions seamlessly roll forward month to month without intervention. The system handles the mundane logistics automatically, freeing the team to focus on promotion strategy and creative development rather than administrative maintenance.
The Future
The current implementation covers the complete promotion lifecycle comprehensively. While future enhancements like automated notifications (alerting the team when promotions are published or unpublished) could be added if requested, the system as built meets all identified requirements.
Barring unforeseen needs, the automation should continue running quietly in the background, doing exactly what it was designed to do without requiring ongoing development attention.


