change woocommerce product statut (draft ->publish // publish->draft) depends on the month [closed]

date(‘M’) => ‘Aug’ and date(‘m’) => 08

add_action('wp', function(){
    $current_month = date('M');
    if( $current_month == 'Aug' ) {
       wp_update_post( array( 
         'ID' => "product_id",
         'post_status' => 'publish'
      ));
    } else {
        wp_update_post( array( 
         'ID' => "product_id",
         'post_status' => 'draft'
      ));
    }
});