gdmaq_cron_daily_maintenance_job_hour
This content is intended for WordPress developers, and it may require coding knowledge of WordPress, PHP, and JavaScript. Code examples provided here may contain errors or needs some additional coding. Make sure to test the code before using it on a live website!
Modify the hour when the daily cron job for maintenance runs. The filter ‘gdmaq_cron_daily_maintenance_job_hour‘ allows you to change the hour.
This filter provides 1 argument.
Arguments
- $hour: hour of the day when to run the cron job, default: 4.
Example
Change maintenance hour.
add_filter('gdmaq_cron_daily_maintenance_job_hour', 'custom__gdmaq_cron_daily_maintenance_job_hour', 10, 1); function custom__gdmaq_cron_daily_maintenance_job_hour($hour) { $hour = 3; return $hour; }