my hook or my function wont run in the cronjob
I got it. Im developing a plugin for woocommerce, so i was adding my Function to my plugin page instead of my include of the functions. Just put it on the functions and it works.
I got it. Im developing a plugin for woocommerce, so i was adding my Function to my plugin page instead of my include of the functions. Just put it on the functions and it works.
Check cache is disabled on live, then try. This is 99% likely a cache issue. If it was the other way around it would likely point to a FQDN issue whereby the domain does not resolve and you would need to modify host files.
Real cron killed my cron system. Only define( ‘ALTERNATE_WP_CRON’, true ); works
Finally i can able to achieve it. // custom_schedules_create function custom_schedules_create( $schedules ) { $schedules[‘every_three_minutes’] = array( ‘interval’ => 180, ‘display’ => __( ‘Every 3 Minutes’, ‘textdomain’ ) ); return $schedules; } add_filter( ‘cron_schedules’, ‘custom_schedules_create’ ); // custom_3minutes_event if ( ! wp_next_scheduled( ‘custom_3minutes_event’ ) ) { $myLocalGMTTimeEvent = time() + 6*60*60; wp_schedule_event( $myLocalGMTTimeEvent, ‘every_three_minutes’, ‘custom_3minutes_event’ … Read more
Use wp_remote_get() with a private or password protected page?
Flush rewrite rules with scheduled event (cron)
Cron task gets removed from the schedule
The reason is when you set only a time without date, the php function strtotime() by default add today as a date so if the time is “04:30”, the timestamp is in the past. I fixed like this : $timestamp = strtotime( $cron_sync_time ); if( $timestamp < time() ){ //if the time already past today … Read more
Cron and request with wp_remote_post
How to pass variable from other function?