Answers.Body: <p>I've come across a similar issue. Looking in the database I could see a row in the <code>civicrm_queue</code> table with the same name but <code>NULL</code> for <code>runner</code>.</p>
  <p>I fixed the issue by deleting that row in the table and performing the import again. The import then worked as normal.</p>
  <p>I have a suspicion that there may be a bug with CiviCRM core and I've created an issue for this:</p>
  <p><a href="https://lab.civicrm.org/dev/core/-/issues/4554" rel="nofollow noreferrer">https://lab.civicrm.org/dev/core/-/issues/4554</a></p>
  <p>The reason that it may work sometimes and not others is that CiviCRM will choose a different job number for each import. It depends whether that particular job number has an entry in the <code>civicrm_queue</code> table as to whether the import works or not.</p>
  <p><strong>Update</strong>: this bug was fixed in CiviCRM 5.68 by <a href="https://github.com/civicrm/civicrm-core/pull/28051" rel="nofollow noreferrer">https://github.com/civicrm/civicrm-core/pull/28051</a>.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-03-30T19:24:40.893Z
Answers.Text: I believe you're absolutely correct. My table has mostly null values and if I start an import a dozen times, I eventually get past those and then it works. THANK YOU for creating an issue to get this fixed. In the meantime, can we just delete those user tasks that have Null in the runner field?
Answers.UserDisplayName: Rick Cunningham
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-04-01T10:10:29.317Z
Answers.Text: See https://lab.civicrm.org/dev/core/-/issues/4554#note_151215 for the query I ran as a temporary workaround.
  
  The underlying issue should have been fixed in CiviCRM 5.68. So I'd suggest upgrading if you haven't done so already.
Answers.UserDisplayName: William Mortada
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-04-10T14:38:16.847Z
Answers.Text: William - your query ran perfectly and deleted all the entries in the Civicrm_queue table - running contact imports to do bulk updates works perfectly now. We're on 5.66 so don't have the corrected version yet. We will update soon, but meanwhile thanks for your help. I don't see anyplace here to thank you but would give you a big thumbs up for all your comments on the subject.
Answers.UserDisplayName: Rick Cunningham
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-04-11T09:55:18.917Z
Answers.Text: Thanks Rick. Glad you found it helpful. You can upvote the answer if you haven't done so already.
Answers.UserDisplayName: William Mortada
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-09-05T17:28:45.563Z
Answers.LastActivityDate: 2024-04-01T10:13:03.850Z
Answers.LastEditDate: 2024-04-01T10:13:03.850Z
Answers.UserDisplayName: William Mortada
Answers.Body: <p>I also replicated the &quot;civicrm_queue.runner property be missing&quot; issue using external ID's using the API CSV Importer. On another <a href="https://civicrm.stackexchange.com/questions/9857/how-do-you-import-custom-relationship-fields">post Laryn points out external ID's failed</a>, so simply do a CID to external ID mapping pre-processing first.</p>
  <p>Sample data format</p>
  <p><a href="https://i.sstatic.net/pDs2A.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/pDs2A.png" alt="enter image description here" /></a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-07-18T19:01:28.720Z
Answers.LastActivityDate: 2023-07-18T19:06:35.187Z
Answers.LastEditDate: 2023-07-18T19:06:35.187Z
Answers.UserDisplayName: Andy Burns
Answers.Body: <p>Update - got it to run, as alluded to above - to get this import to run, I repeatedly started it, noting the user_task_xx was different each time, and I was getting these task numbers in roughly increasing numerical order - I continued until the job number was one of those that did NOT have Null in the runner name column. So now I feel sure that those records are the issue. Does anyone know whether the records for user job can be deleted for those where the Runner Column has &quot;null&quot; instead of &quot;task&quot;? (and no, I don't know why this is bolded!)</p>
  <p>========================</p>
  <p>I am having this same problem with trying to import &quot;do not email&quot; flag for a batch of contacts. This worked fine a few days ago, but failed multiple times today. I have cut down the file to small batches and finally to one record and then eventually to just two columns (&quot;contact ID&quot; and &quot;Do Not Email&quot;) and keep getting the same error. Looking at the civicrm_queue table, I see 54 records in the civicrm_queue table, with each row having a Name of &quot;user_job_xx&quot; where xx is a number from 1 to 59. The jobs names are in ascending order with a few numbers skipped, up to 48, which is then followed by one of the skipped numbers. So all the sequential queues have a value of &quot;null&quot; for the column &quot;Name - name of the task runner&quot;. After the break in the increasing numbers, the job 7 has a runner name of &quot;task&quot; and all the rest also have that name. Is it possible this table is corrupted, and could some records be deleted? The post above indicates that a task number is chosen at random, so this might work next time I try it?</p>
  <p><a href="https://i.sstatic.net/hK3iH.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/hK3iH.jpg" alt="civicrm_queue table contents showing the transition from null to task for name of task runner" /></a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-04-01T10:03:56.183Z
Answers.Text: You've posted this as an answer, but you appear to also be asking questions. StackExchange isn't a discussion forum it's a question and answer site. You are more likely to get answers to your questions if you post them as new questions (with a link here if relevant).
Answers.UserDisplayName: William Mortada
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-04-01T10:06:03.057Z
Answers.Text: In answer to your question, my understanding is that it should be safe to delete records from `civicrm_queue` so long as you aren't running any jobs in the background. See https://lab.civicrm.org/dev/core/-/issues/4554#note_150992
Answers.UserDisplayName: William Mortada
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-04-01T10:07:46.247Z
Answers.Text: The reason the first paragraph was in bold is that you had `======` directly below it which denotes a heading in markdown https://civicrm.stackexchange.com/editing-help#headers. I added a blank line to fix this.
Answers.UserDisplayName: William Mortada
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-04-10T14:42:41.283Z
Answers.Text: William is correct on all this - note that he's got a query above that will delete all unneeded records in the civicrm_queue table and it works fine and corrected the error for me. Note also that William reported this error and it has been addressed in 5.68 (we're at 5.66 and that's why it's still affected us) Thanks William!
Answers.UserDisplayName: Rick Cunningham
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-03-30T18:57:33.433Z
Answers.LastActivityDate: 2024-04-01T09:59:43.090Z
Answers.LastEditDate: 2024-04-01T09:59:43.090Z
Answers.UserDisplayName: Rick Cunningham
Body: <p>I am trying to import contacts and getting the following errors:</p>
  <p>Cannot execute queue &quot;user_job_6&quot;. The &quot;civicrm_queue.runner&quot; property is missing.</p>
  <p><a href="https://i.sstatic.net/0ywaS.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/0ywaS.png" alt="enter image description here" /></a></p>
  <p>Any idea why?</p>
  <p>5.61.4 wordpress</p>
  <p>Edit: this issue fixed itself after 24 hours - using same dataset.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-06-09T20:51:44.047Z
Comments.Text: if you haven't already, would it be worth retrying the import with just one row of data to check it is nothing to do with any of the data in the csv?
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-07-18T19:16:16.850Z
Comments.Text: I assume you are using the core importer? Also replicated the error with the API CSV Importer.
Comments.UserDisplayName: Andy Burns
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-03-31T02:04:08.610Z
Comments.Text: I think the answer is below - it’s a roll of the device which task in the civicrm_queue table gets executed - I suspect the queue table is supposed to be empty eventually. Mine has 55 records in it - are these vestiges of aborted earlier tasks?
Comments.UserDisplayName: Rick Cunningham
Tags: <import><data-import>
Title: Why would the "civicrm_queue.runner" property be missing?
ThreadText: # Why would the "civicrm_queue.runner" property be missing?
  
  (Asked by: username_0 on 2023-06-08)
  
  I am trying to import contacts and getting the following errors:
  
  Cannot execute queue "user\_job\_6". The "civicrm\_queue.runner" property is missing.
  
  [![enter image description here](https://i.sstatic.net/0ywaS.png)](https://i.sstatic.net/0ywaS.png)
  
  Any idea why?
  
  5.61.4 wordpress
  
  Edit: this issue fixed itself after 24 hours - using same dataset.
  
  **Tags:** import, data-import
  
  > **Comments:**
  > **username_1**: if you haven't already, would it be worth retrying the import with just one row of data to check it is nothing to do with any of the data in the csv?  
  > **username_2**: I assume you are using the core importer? Also replicated the error with the API CSV Importer.  
  > **username_3**: I think the answer is below - it’s a roll of the device which task in the civicrm_queue table gets executed - I suspect the queue table is supposed to be empty eventually. Mine has 55 records in it - are these vestiges of aborted earlier tasks?  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_4 on 2023-09-05. Score: 4
  
  I've come across a similar issue. Looking in the database I could see a row in the `civicrm_queue` table with the same name but `NULL` for `runner`.
  
  I fixed the issue by deleting that row in the table and performing the import again. The import then worked as normal.
  
  I have a suspicion that there may be a bug with CiviCRM core and I've created an issue for this:
  
  <https://lab.civicrm.org/dev/core/-/issues/4554>
  
  The reason that it may work sometimes and not others is that CiviCRM will choose a different job number for each import. It depends whether that particular job number has an entry in the `civicrm_queue` table as to whether the import works or not.
  
  **Update**: this bug was fixed in CiviCRM 5.68 by <https://github.com/civicrm/civicrm-core/pull/28051>.
  
  > **Comments:**
  > **username_3**: I believe you're absolutely correct. My table has mostly null values and if I start an import a dozen times, I eventually get past those and then it works. THANK YOU for creating an issue to get this fixed. In the meantime, can we just delete those user tasks that have Null in the runner field?  
  > **username_4**: See https://lab.civicrm.org/dev/core/-/issues/4554#note_151215 for the query I ran as a temporary workaround.  The underlying issue should have been fixed in CiviCRM 5.68. So I'd suggest upgrading if you haven't done so already.  
  > **username_3**: William - your query ran perfectly and deleted all the entries in the Civicrm_queue table - running contact imports to do bulk updates works perfectly now. We're on 5.66 so don't have the corrected version yet. We will update soon, but meanwhile thanks for your help. I don't see anyplace here to thank you but would give you a big thumbs up for all your comments on the subject.  
  > **username_4**: Thanks Rick. Glad you found it helpful. You can upvote the answer if you haven't done so already.  
  
  ---
  
  ### Answer by username_2 on 2023-07-18. Score: 1
  
  I also replicated the "civicrm\_queue.runner property be missing" issue using external ID's using the API CSV Importer. On another [post Laryn points out external ID's failed](https://civicrm.stackexchange.com/questions/9857/how-do-you-import-custom-relationship-fields), so simply do a CID to external ID mapping pre-processing first.
  
  Sample data format
  
  [![enter image description here](https://i.sstatic.net/pDs2A.png)](https://i.sstatic.net/pDs2A.png)
  
  
  ---
  
  ### Answer by username_3 on 2024-03-30. Score: 0
  
  Update - got it to run, as alluded to above - to get this import to run, I repeatedly started it, noting the user\_task\_xx was different each time, and I was getting these task numbers in roughly increasing numerical order - I continued until the job number was one of those that did NOT have Null in the runner name column. So now I feel sure that those records are the issue. Does anyone know whether the records for user job can be deleted for those where the Runner Column has "null" instead of "task"? (and no, I don't know why this is bolded!)
  
  ========================
  
  I am having this same problem with trying to import "do not email" flag for a batch of contacts. This worked fine a few days ago, but failed multiple times today. I have cut down the file to small batches and finally to one record and then eventually to just two columns ("contact ID" and "Do Not Email") and keep getting the same error. Looking at the civicrm\_queue table, I see 54 records in the civicrm\_queue table, with each row having a Name of "user\_job\_xx" where xx is a number from 1 to 59. The jobs names are in ascending order with a few numbers skipped, up to 48, which is then followed by one of the skipped numbers. So all the sequential queues have a value of "null" for the column "Name - name of the task runner". After the break in the increasing numbers, the job 7 has a runner name of "task" and all the rest also have that name. Is it possible this table is corrupted, and could some records be deleted? The post above indicates that a task number is chosen at random, so this might work next time I try it?
  
  [![civicrm_queue table contents showing the transition from null to task for name of task runner](https://i.sstatic.net/hK3iH.jpg)](https://i.sstatic.net/hK3iH.jpg)
  
  > **Comments:**
  > **username_4**: You've posted this as an answer, but you appear to also be asking questions. StackExchange isn't a discussion forum it's a question and answer site. You are more likely to get answers to your questions if you post them as new questions (with a link here if relevant).  
  > **username_4**: In answer to your question, my understanding is that it should be safe to delete records from `civicrm_queue` so long as you aren't running any jobs in the background. See https://lab.civicrm.org/dev/core/-/issues/4554#note_150992  
  > **username_4**: The reason the first paragraph was in bold is that you had `======` directly below it which denotes a heading in markdown https://civicrm.stackexchange.com/editing-help#headers. I added a blank line to fix this.  
  > **username_3**: William is correct on all this - note that he's got a query above that will delete all unneeded records in the civicrm_queue table and it works fine and corrected the error for me. Note also that William reported this error and it has been addressed in 5.68 (we're at 5.66 and that's why it's still affected us) Thanks William!  
  
  ---
  
  