title: Update all posts in custom post type with wp_cron()
body: <p>I have made a function to apply a taxonomy term to post, if it has a post meta value set to true. This works as should.<br>
  <strong>The problem I am facing is that it only updates after I have manually saved/updated the post</strong>. 
  Is there any way to schedule this or do it dynamically for all posts inside the custom post type? </p>
  
  <p>My code for the taxonomy term function:-</p>
  
  <pre><code>function save_cp_term_meta( $post_id, $post, $update ) {
      $termshouldbe='new';
  
      $meta_value = get_post_meta( $post-&gt;ID, 'new_used_cat', true ); 
          if  (!empty( $meta_value )) 
          { 
             $termshouldbe='used';
          }
          else 
          {
          } 
  
      wp_set_object_terms($post_id,$termshouldbe,'vehicle_condition',false);
  }
  add_action( 'save_post', 'save_cp_term_meta', 10, 3 );
  </code></pre>