each configuration is different from hosting A and hosting B.
You must follow the guide of your hosting.
If the main domain and the subdomains are in the center of the language, it is absolutely your hosting will change based on the HTTP_HOST variable from the browser .. (it is not the only way but one of the most used).
You need to ask your host for more information as follows: I have a wordpress multisite with main domain end subdomains, how can I enable cron jobs for the main domain and subdomains?
After you get this answer I write you a php code to do your tests (I want to know if the hosting up is based on HTTP_HOST to distinguish the domains).
I modified the previous post with this post.
wp-cron.php offer three method
// Use global $doing_wp_cron lock otherwise use the GET lock. If no lock, trying grabbing a new lock.
if ( empty( $doing_wp_cron ) ) {
if ( empty( $_GET['doing_wp_cron'] ) ) {
// Called from external script/job. Try setting a lock.
if ( $doing_cron_transient && ( $doing_cron_transient + WP_CRON_LOCK_TIMEOUT > $gmt_time ) ) {
return;
}
$doing_cron_transient = $doing_wp_cron = sprintf( '%.22F', microtime( true ) );
set_transient( 'doing_cron', $doing_wp_cron );
} else {
$doing_wp_cron = $_GET['doing_wp_cron'];
}
}
Example
wp-cron.php with set variable $doing_wp_cron or
wp-cron.php or
wp-cron.php?doing_wp_cron=1560090633.5487570762634277343750
-
This reply was modified 5 years, 5 months ago by autotutorial.