Book Image

WordPress Web Application Development

By : Rakhitha Nimesh Ratnayake
Book Image

WordPress Web Application Development

By: Rakhitha Nimesh Ratnayake

Overview of this book

Table of Contents (19 chapters)
WordPress Web Application Development Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Scheduling subscriber notifications


Sending notifications is a common task in any web application. In this scenario, we have subscribers who want to receive e-mail updates about developer activities. In Chapter 8, Enhancing the Power of Open Source Libraries and Plugins, we created a simple e-mail notification system on post publish. Notifying subscribers on post publish can become impossible in a situation where you have a large number of subscribers. Therefore, we will take a look at the scheduling features of WordPress for automating the notification sending process.

As a developer, you might be familiar with cron, which executes certain tasks in a time-based manner. WordPress scheduling functions offer the same functionality with less flexibility. In WordPress, this action will be triggered only when someone visits the site after the scheduled time has passed. In a normal cron job, the action will be triggered without any interaction from users. Let's see how to schedule subscriber notifications...