How to add recurring to all product by default monthly?
Finally its solved by changing the code in rules

&lt;?php
    //Recurring
    $data = array(
   'pfid' =&gt; ' ',
   'nid' =&gt; $node-&gt;nid,
   'fid' =&gt; 'recurring',
   'description'=&gt;'When this product is purchased, add a fee for the same amount as the product selling price charged first after 0 days and every 1 months after that 99 times.',
     );
   drupal_write_record('uc_product_features', $data);

   $q = "SELECT pfid FROM {uc_product_features} WHERE fid= '%s' AND nid = %d";
   $result = db_query($q, 'recurring', $node-&gt;nid);
   $num = db_result($result);


  // Build the recurring fee's product object.
   $product-&gt;pfid = $num; //pfid
   $product-&gt;model = '';
   $product-&gt;fee_amount = 0.000;
   $product-&gt;initial_charge = '0 days';
   $product-&gt;regular_interval = '1 months';
   // If number intervals is negative, it means that it's unlimited intervals.
   $product-&gt;number_intervals = 100;
   $product-&gt;nid = $node-&gt;nid;

   uc_recurring_product_feature_save($product);
 ?&gt;


I am not sure whether its a proper way..