Run a single cron, it’s much more manageable and more stable, and performance shouldn’t be an issue since you do 99% of the work of selecting which user should be notified in MySQL, which will be extremely fast.
I’d use a table to save each day (and each user on that day) that my cron has successfully run for, to make it more resilient. Plan for failure, not for success, because it will fail at some point, and the importance is how bad that failure will be and how much time it will take you to fix the fallout.
Server crashes right before midnight and is rebooted at 00:05? No problem, just run the job manually, or wait till the next day, it’ll run two days in one run!
Server crashes while executing the cron? No worries, the next time it runs, it’ll pick up right where it stopped last time.
Related Posts:
- WP Cron: Save third party data as user meta
- how to get list of all users and their metadata
- How to make a custom column on the Users admin screen sortable?
- wp_update_user doesn’t update and update_user_meta does
- remove user_meta data from database for all users
- How to get last login Access Date and time
- How to get user metadata for social media url?
- Admin user edit – Grab newly submitted user meta immediately after update/submit
- wp_get_current_user in custom file returns 0
- Is there a limit to the length/size of serialized data that can be stored as user meta?
- Customizing WP tables or adding new ones?
- Are the default entries for a user in wp_usermeta documented?
- update_user_meta adding new rows in db for same key
- What is the meta-box-order_post_hash used for?
- Allow role to edit users at lower level with only specific metadata
- User meta conventions / name registry, for social media links
- Get user’s ID on logout
- Sanitize textarea instead of input
- Multiple User-Meta Values in One User-Meta Key
- Getting $user_id for the_author_meta outside the loop in multisite
- Gravity Custom Merge Tags [closed]
- How to insert new element to existing array in usermeta?
- Update user meta through a front end form
- What is the difference between get_the_author_meta() and get_user_meta()?
- Can I prevent “wp_user_level” from getting added to wp_usermeta on registration?
- Get the Google+ and Twitter links – WordPress SEO plugin
- Showing all users who match 2 meta fields with current user
- Adding current user’s ID to the end of PDF hyperlinks in post content
- Send mail to user only once when specific check box is selected and updated from profile meta updated by admin
- add custom field in user register form
- Is it possible to read a result if wp_update_user or update_user_meta fails?
- User last login and user last visit problem
- Why get_users() not working on the admin backend?
- Can I set user meta for theoretical user 0?
- Is there a way to append meta data without creating a race condition?
- I want to update my user meta table
- Subscribers Group User meta delete
- get_user_meta returning empty when it’s NOT empty
- Multiple meta values for one meta key
- When is a user’s meta data table loaded?
- Display and Update User Custom Meta via user-edit.php
- WordPress REST API and User meta data
- How do I add a dropdown list of numbers 1 – 1000 as an extra profile field?
- Get user meta for only the keys with a certain prefix
- Serializing User Role for update_user_meta
- Get user_meta values for a user for an array of meta_keys?
- Fetch user related data
- Displaying field value in new column in users view on wordpress
- add_user_meta allows multiple clicks and inserts more than 1 value
- Add user meta fields on creating the user
- Order By Meta_key but convert custom date to Y-m-d first
- How to add to a user_meta field (append)
- editing usermeta when field is an array
- Combining wp_list_authors with get_user_meta
- How to order users by a date in the meta_value array
- How to order custom fields in the user profile (admin area)
- Getting a users username in get_user_meta
- Updating user meta on save post
- Save editor’s value in user meta and retrieve it
- How to get its meta_value of a specific meta_key within wp_usermeta
- How do i put in user id in a banner
- Exclude specific user_id from args in get_comments
- How do I sort a WP_USER_QUERY by multiple meta fields?
- WP_Editor not saving data in user_meta
- Update user meta array using foreach
- Can’t get the user_meta correctly
- Display Country Flag in Profile WordPress/Buddypress
- get random users each time based on the meta key
- How $_GET[‘updated’] variable is passed when updating a user?
- How to get metadata (in my case mail) of users who have a certain set of metadata?
- user metadata in json format, update the data partly only
- check metadata in wordpress
- How can I return an error message when updating user meta?
- Adding user metadata to all users
- Get user count based on multiple meta key values?
- how to save multiple checkbox in usermeta and get it?
- Existing user_meta fields not updated
- get_the_author_meta i want to write in a loop
- How can I track who clicked what in my member area?
- How to gets users EMAIL by their USERNAME
- Get user meta on registration hook
- Storing data to database and user registration
- Using wp_login vs login_redirect to redirect based on user-meta
- update_user_meta inside a popup/modal
- add_user_meta() vs update_user_meta()
- Get all data form users and users metakey
- How to get user meta value in wordpress
- How to display checkbox meta array values one by one?
- User biographical information erased on login
- Fetch User Meta Data
- How to toggle delete/update user meta values?
- If logged in user meta is
- Reordering fields in registration form via custom plugin
- Multidimensional array problem with update_post_meta [duplicate]
- CRM and newsletter integration? [closed]
- Strip Twitter Username from Profile Field with URL and Save to New Profile Field
- Custom user meta values in shortcode
- Update another users meta
- get user id from custom user meta key
- Can’t display user bio