Answers.Body: <p>I think it should work if you change 'ids' to 'id' as per below</p>
  <p>exclude_membership_status_id=[4,5,6,7,8]</p>
  <p>I tried on a local copy, executed the job and it did process - details below</p>
  <pre><code>Parameters raw (from db settings): 
  exclude_membership_status_id=[4,5]
  
  Parameters parsed (and passed to API method): 
  a:2:{s:7:&quot;version&quot;;i:3;s:28:&quot;exclude_membership_status_id&quot;;s:5:&quot;[4,5]&quot;;}
  
  Full message: 
  Finished execution of Update Membership Statuses with result: Success (Processed 26 membership records. Updated 0 records.)
  </code></pre>
  <p>Hope that will work for you too.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-01-12T10:41:42.480Z
Answers.LastActivityDate: 2024-01-12T10:41:42.480Z
Answers.UserDisplayName: RebeccaTregenna
Body: <p>We added a special pending memberhsip status for a client, but because it is not one of the default statuses, it is not getting excluded when the Update Membership Statuses scheuled job runs and is therefore getting processed. I noticed that the scheduled job <em>should</em> be able to take a parameter with an <em>array</em> of ints to tell the job what statuses to ignore, but it appears that the input parameter doesn't actually take an <em>array</em> of ints, but only a single one (which isn't helpful). Here is the error the gets returned when I run the scheduled job with the param:</p>
  <p><em>Summary: Finished execution of Update Membership Statuses with result: Failure, Error message: exclude_membership_status_ids is not a valid integer</em></p>
  <p>Here is the parameter I added to the scheduled job.</p>
  <p><em>exclude_membership_status_ids=[4,5,6,7,8]</em></p>
  <p>I also tried it without the square brackets:</p>
  <p><em>exclude_membership_status_ids=4,5,6,7,8</em></p>
  <p>What am I missing? Is this a bug in the code? How can I exclude my new membership status from being processed (and being set to New even though it is a special Pay Later pending status)?</p>
  
Tags: <civimember><scheduled-job><status>
Title: Passing exclude list to the Update Membership Statuses scheduled job
ThreadText: # Passing exclude list to the Update Membership Statuses scheduled job
  
  (Asked by: username_0 on 2024-01-06)
  
  We added a special pending memberhsip status for a client, but because it is not one of the default statuses, it is not getting excluded when the Update Membership Statuses scheuled job runs and is therefore getting processed. I noticed that the scheduled job *should* be able to take a parameter with an *array* of ints to tell the job what statuses to ignore, but it appears that the input parameter doesn't actually take an *array* of ints, but only a single one (which isn't helpful). Here is the error the gets returned when I run the scheduled job with the param:
  
  *Summary: Finished execution of Update Membership Statuses with result: Failure, Error message: exclude\_membership\_status\_ids is not a valid integer*
  
  Here is the parameter I added to the scheduled job.
  
  *exclude\_membership\_status\_ids=[4,5,6,7,8]*
  
  I also tried it without the square brackets:
  
  *exclude\_membership\_status\_ids=4,5,6,7,8*
  
  What am I missing? Is this a bug in the code? How can I exclude my new membership status from being processed (and being set to New even though it is a special Pay Later pending status)?
  
  **Tags:** civimember, scheduled-job, status
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2024-01-12. Score: 2 | Accepted answer
  
  I think it should work if you change 'ids' to 'id' as per below
  
  exclude\_membership\_status\_id=[4,5,6,7,8]
  
  I tried on a local copy, executed the job and it did process - details below
  
  ```
  Parameters raw (from db settings): 
  exclude_membership_status_id=[4,5]
  
  Parameters parsed (and passed to API method): 
  a:2:{s:7:"version";i:3;s:28:"exclude_membership_status_id";s:5:"[4,5]";}
  
  Full message: 
  Finished execution of Update Membership Statuses with result: Success (Processed 26 membership records. Updated 0 records.)
  
  ```
  
  Hope that will work for you too.
  
  
  ---
  
  