Cron not sending wp-mail()

You can test if mail has been sent or not using the following: // Set $to as the email you want to send the test to. $to = “[email protected]”; // Email subject and body text. $subject=”wp_mail function test”; $message=”This is a test of the wp_mail function: wp_mail is working.woo!”; $headers=””; // Load WP components, no … Read more

WordPress CRON job working when reloading the page

WordPress Cron Jobs are not “real” Cronjobs, instead they relie on somebody visiting the site, then looking if it’s time to do scheduled jobs. 1.: Someone visits the website 2.: WordPress calls the file wp-cron.php 3.: wp-cron.php looks into the database if there are scheduled jobs that are due at this time. 4.: wp-cron.php does … Read more

Trigger WP CRON from a date in a Custom Field?

You will have to write a plugin which creates a daily cron job in the WordPress system. Here’s an article describing how to write a cron plugin: https://wpguru.co.uk/2014/01/how-to-create-a-cron-job-in-wordpress-teach-your-plugin-to-do-something-automatically/ The function (callback) that you trigger in the cron plugin will use WP_QUERY to get a list of all your published custom post types after a certain … Read more

Scheduled post delete – can’t pass the cron arguments

Comparing your code to the WordPress function wp_schedule_single_event, it appears you failed to indicate that parameters would be passed. Perhaps the following version of your code will work for you. add_action( ‘crondelete’, ‘delete_page_in’,10,1); wp_schedule_single_event($seconds, ‘crondelete’, array($new_post_id )); Notice the add_action now includes two extra parameters: 10=Priority, and 1=Accepted Arguments to be passed.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)