Last active
March 25, 2022 10:20
-
-
Save dankerizer/a3613e0732d682e5043803807b07b36e to your computer and use it in GitHub Desktop.
WordPress Custom Cronjob Monthly
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function wp_custom_cron_job_monthly( $schedules ) { | |
if(!isset($schedules['monthly'])){ | |
$schedules['monthly'] = array( | |
'display' => __( 'Once monthly', 'textdomain' ), | |
'interval' => 2635200, | |
); | |
} | |
return $schedules; | |
} | |
add_filter( 'cron_schedules', 'custom_cron_job_monthly' ); | |
Author
dankerizer
commented
Mar 25, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment