how to make a cronjob run, when user needs to be logged in
how to make a cronjob run, when user needs to be logged in
how to make a cronjob run, when user needs to be logged in
Cron job emails blank
How many posts do you have? – Maybe there are some delays because of hosting? You want to create your own plugin collecting the data from Google Analytics – I’m not sure you’re able to do that. “The main idea is to get views per post and store them with post meta.” – Why do … Read more
Plugin with functions inside a class & how to trigger WP CRON
How to add a cron job in my functions.php
New database entry to trigger runing PHP/SQL query through link with token, without logging into the website
Run external file cron using WordPress Scheduler
unix cronjob for wordpress does not stop running
Managed to find the solution. My finished code is: register_activation_hook ( __FILE__, ‘cron_job’ ); function cron_job() { wp_schedule_event( time(), ‘hourly’, ‘hourly_job’ ); } add_action( ‘hourly_job’, ‘cron_job_task’ ); function cron_job_task () { $users = get_users( array( ‘fields’ => array( ‘ID’, ‘user_registered’ ), ‘role’ => ‘coaching’, ) ); foreach ( $users as $user ) { $time = … Read more
You’re not specifying the number of posts you want back from the query, so it defaults to whatever you have set under Settings > Reading. If you want all that match your criteria, then add ‘posts_per_page’ => -1 to your query arguments.