Trying to set up custom schedules for WP Cron, knowing that they use an interval is it even possible to set up a cron job for every first of the month? As well as every fifteenth. This is what I have so far:
private function cron_schedules( $schedules ) {
$midnight = strtotime( "midnight", current_time( 'timestamp' ) );
$first = strtotime( 'first day of this month', $midnight );
$fifteenth = $first + (7 * 24 * 60 * 60) * 2;
$schedules['1st'] = array(
'interval' => $first,
'display' => __('1st of every month'),
);
$schedules['15th'] = array(
'interval' => $fifteenth,
'display' => __('15th of every month'),
);
$schedules['weekly'] = array(
'interval' => ( 7 * 24 * 60 * 60 ),
'display' => __('Weekly'),
);
$schedules['biweekly'] = array(
'interval' => ( 7 * 24 * 60 * 60 ) * 2,
'display' => __('Biweekly'),
);
return $schedules;
}