PressTigers

Cron Jobs in WordPress to Send Email after every Hour

Cron jobs are used to schedule the execution of a specific task at a specific time or after a defined interval. These jobs are usually executed periodically. Cron is a UNIX command. WordPress uses wp-cron to schedule a cron job. In this article, you will learn how to set up a cron job to send out an email automatically to the provided email address after every hour.

Use the following code to schedule an automatic email sender after every hour:

You can alternate recipient email address, subject and content in the wp_mail function.

User Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Get in Touch