Answers.Body: <p>The errors have stopped and the cronjob now functions properly. The only thing I did different was create the CiviCRM Admin Role and apply it through the WordPress ACL feature. It solved the error for API issues and appears to have cleared up the errors via email. I cannot comment on whether the cronuser account could be set at a lower level than CiviCRM Admin Role as it is beyond my knowledge. I can say that the cronuser inside of WordPress is set to Subscriber. Honestly, since so many folks have problems with this (I put it off for nearly 5 years now) I would have thought someone would have spelled out IN CLEAR AND PRECISE TERMS, what roles were necessary to assign to kick off the Scheduled Jobs. If anyone might know the answer I would BE GREATLY APPRECIATIVE!</p>
  <p>Here is the document discussing it all:</p>
  <p><a href="https://docs.civicrm.org/user/en/latest/initial-set-up/permissions-and-access-control/" rel="nofollow noreferrer">https://docs.civicrm.org/user/en/latest/initial-set-up/permissions-and-access-control/</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-03-19T23:14:08.890Z
Answers.LastActivityDate: 2023-03-19T23:14:08.890Z
Answers.UserDisplayName: Paul Williams
Answers.Body: <p>The permissions that your scheduled job runner needs depends on what permissions are needed for the jobs you have selected to be run.  If Job A requires permissions 1 and 2, and Job B requires permission 3 and you do a typical <code>cv api Job.execute</code> to run them, then your user needs permissions 1,2 &amp; 3 etc.</p>
  <p>However, most jobs don't clearly identify what permissions they need making it hard to know what to specify.  On top of that, the documentation writers obviously don't know what combination of jobs you are going to enable - so the documentation is not going to tell you a minimum set of permissions.</p>
  <p>Generally the cron user is set up as admin so it has full access to everything it might need.  The list of what jobs are run is managed by admins.</p>
  <p>If you have separate cron entries for specific jobs (eg <code>cv api Job.mail_report</code>) you could try to identify the minimum set of permissions needed and configure a cron user with that - but if you also have a generic admin user for other jobs, it is not clear what the benefit is.</p>
  <p>I do agree the documentation at <a href="https://docs.civicrm.org/sysadmin/en/latest/setup/jobs/#choosing-a-cms-user" rel="nofollow noreferrer">https://docs.civicrm.org/sysadmin/en/latest/setup/jobs/#choosing-a-cms-user</a> could be more helpful. It says the user needs 'correct permissions' but does not suggest how you might figure that out.  Maybe when you have got things working you could improve that section?</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-03-24T15:16:02.853Z
Answers.Text: Just saw your comment. Would love to improve the section, but all I can really do is chronicle what worked as I am really just a novice. Is there somewhere I should post my notes and folks could "mold" it into an improvement? Cronjob works fine now, but the oddities of triggering "Processed as Activity: xxx" still occur.
Answers.UserDisplayName: Paul Williams
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-03-24T22:17:30.010Z
Answers.Text: Don't let being a novice put you off!  If you can make any incremental improvements to the docs, that may help the next person.  Whatever you write will get reviewed before being merged which should avoid anything too glaringly wrong getting through!
Answers.UserDisplayName: Aidan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-03-20T10:07:26.260Z
Answers.LastActivityDate: 2023-03-20T10:07:26.260Z
Answers.UserDisplayName: Aidan
Body: <p>WordPress v6.1.1 CiviCRM v5.59.2</p>
  <p>So, my cronjob appears to work; however, there are some oddities in how it works and there are errors picked up in the email that is delivered.</p>
  <p>The oddities are as follows and change up about every 12 hours with no rhyme or reason:</p>
  <ol>
  <li>Processed as Activity: Drivers Can Be Contractors: Calif. Panel Mostly Backs Prop 22</li>
  <li>Processed as Activity: No Retrial For Weinstein On LA Sex Assault Counts</li>
  <li>Processed as Activity: Security alert for coo@foreclosurepedia.org</li>
  </ol>
  <p>Now, I am in shared hosting on Business Cloud wherein, I have several websites. With respect to #3, it is citing my foreclosurepedia.org website (and email address).</p>
  <p>I also have two errors for jobs. One is for scheduled emails and the other is for SMS, that we have never used.</p>
  <ol>
  <li><p>Finished execution of Send Scheduled Mailings with result: Failure, Error message: API permission check failed for Group/get call; insufficient permission: require access CiviCRM</p>
  </li>
  <li><p>Finished execution of Send Scheduled SMS with result: Failure, Error message: API permission check failed for Group/get call; insufficient permission: require access CiviCRM</p>
  </li>
  </ol>
  <p>Below is the cronjob set up for cPanel. The user is an Editor not an Admin in the WordPress hierarchical roles using the WordPress ACL. (I can change it to Administrator, but seems <em>scary</em> as having multiple administrators isn't the best way.) It is set up to run every hour. It updates all of the Scheduled Jobs other than the two errors and those just happened 19MAR23.</p>
  <p>Cron xxx@xx wget -O - -q -t 1 'https://www.iafst.org/wp-content/plugins/civicrm/civicrm/bin/cron.php?name=username&amp;pass=password&amp;key=key' --- it has a second ' at the end as it is required for cPanel.</p>
  <p>Also, would the errors about the API permission check occur because we are on MariaDB v10.6.11, which is similar to MySQL 8.0. I found an article that stated MySQL v8 triggers connection errors due to how MySQL 8 defaults to auth_socket connections. I am guessing that by executing ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password'; fix this?</p>
  <p>Added on 19MAR23 at 1439EDT: So, the Cronjob appears to be happy as it says:  Cron Running OK Last cron run at March 19th, 2023 2:00 PM. The errors are gone. All I did was utilize the WordPress ACL and create the CiviCRM Admin Role and assign it to the cronuser. Does this mean I no longer have to mess with the MySQL change cited in the article below (which is MariaDB on my side)? Thanx!</p>
  <p><a href="https://dcblog.dev/mysql-80-error-the-server-requested-authentication-method-unknown-to-the-client" rel="nofollow noreferrer">Article located here IN RE: Last paragraph</a>.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-03-19T17:29:20.290Z
Comments.Text: It should be noted that I invoked the CiviCRM Admin Role which was assigned to the cronuser.
Comments.UserDisplayName: Paul Williams
Tags: <wordpress><cron-job>
Title: WordPress Cronjob Oddities
ThreadText: # WordPress Cronjob Oddities
  
  (Asked by: username_0 on 2023-03-19)
  
  WordPress v6.1.1 CiviCRM v5.59.2
  
  So, my cronjob appears to work; however, there are some oddities in how it works and there are errors picked up in the email that is delivered.
  
  The oddities are as follows and change up about every 12 hours with no rhyme or reason:
  
  1. Processed as Activity: Drivers Can Be Contractors: Calif. Panel Mostly Backs Prop 22
  2. Processed as Activity: No Retrial For Weinstein On LA Sex Assault Counts
  3. Processed as Activity: Security alert for coo@foreclosurepedia.org
  
  Now, I am in shared hosting on Business Cloud wherein, I have several websites. With respect to #3, it is citing my foreclosurepedia.org website (and email address).
  
  I also have two errors for jobs. One is for scheduled emails and the other is for SMS, that we have never used.
  
  1. Finished execution of Send Scheduled Mailings with result: Failure, Error message: API permission check failed for Group/get call; insufficient permission: require access CiviCRM
  2. Finished execution of Send Scheduled SMS with result: Failure, Error message: API permission check failed for Group/get call; insufficient permission: require access CiviCRM
  
  Below is the cronjob set up for cPanel. The user is an Editor not an Admin in the WordPress hierarchical roles using the WordPress ACL. (I can change it to Administrator, but seems *scary* as having multiple administrators isn't the best way.) It is set up to run every hour. It updates all of the Scheduled Jobs other than the two errors and those just happened 19MAR23.
  
  Cron xxx@xx wget -O - -q -t 1 'https://www.iafst.org/wp-content/plugins/civicrm/civicrm/bin/cron.php?name=username&pass=password&key=key' --- it has a second ' at the end as it is required for cPanel.
  
  Also, would the errors about the API permission check occur because we are on MariaDB v10.6.11, which is similar to MySQL 8.0. I found an article that stated MySQL v8 triggers connection errors due to how MySQL 8 defaults to auth\_socket connections. I am guessing that by executing ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql\_native\_password BY 'password'; fix this?
  
  Added on 19MAR23 at 1439EDT: So, the Cronjob appears to be happy as it says: Cron Running OK Last cron run at March 19th, 2023 2:00 PM. The errors are gone. All I did was utilize the WordPress ACL and create the CiviCRM Admin Role and assign it to the cronuser. Does this mean I no longer have to mess with the MySQL change cited in the article below (which is MariaDB on my side)? Thanx!
  
  [Article located here IN RE: Last paragraph](https://dcblog.dev/mysql-80-error-the-server-requested-authentication-method-unknown-to-the-client).
  
  **Tags:** wordpress, cron-job
  
  > **Comments:**
  > **username_0**: It should be noted that I invoked the CiviCRM Admin Role which was assigned to the cronuser.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2023-03-19. Score: 1 | Accepted answer
  
  The errors have stopped and the cronjob now functions properly. The only thing I did different was create the CiviCRM Admin Role and apply it through the WordPress ACL feature. It solved the error for API issues and appears to have cleared up the errors via email. I cannot comment on whether the cronuser account could be set at a lower level than CiviCRM Admin Role as it is beyond my knowledge. I can say that the cronuser inside of WordPress is set to Subscriber. Honestly, since so many folks have problems with this (I put it off for nearly 5 years now) I would have thought someone would have spelled out IN CLEAR AND PRECISE TERMS, what roles were necessary to assign to kick off the Scheduled Jobs. If anyone might know the answer I would BE GREATLY APPRECIATIVE!
  
  Here is the document discussing it all:
  
  <https://docs.civicrm.org/user/en/latest/initial-set-up/permissions-and-access-control/>
  
  
  ---
  
  ### Answer by username_1 on 2023-03-20. Score: 2
  
  The permissions that your scheduled job runner needs depends on what permissions are needed for the jobs you have selected to be run. If Job A requires permissions 1 and 2, and Job B requires permission 3 and you do a typical `cv api Job.execute` to run them, then your user needs permissions 1,2 & 3 etc.
  
  However, most jobs don't clearly identify what permissions they need making it hard to know what to specify. On top of that, the documentation writers obviously don't know what combination of jobs you are going to enable - so the documentation is not going to tell you a minimum set of permissions.
  
  Generally the cron user is set up as admin so it has full access to everything it might need. The list of what jobs are run is managed by admins.
  
  If you have separate cron entries for specific jobs (eg `cv api Job.mail_report`) you could try to identify the minimum set of permissions needed and configure a cron user with that - but if you also have a generic admin user for other jobs, it is not clear what the benefit is.
  
  I do agree the documentation at <https://docs.civicrm.org/sysadmin/en/latest/setup/jobs/#choosing-a-cms-user> could be more helpful. It says the user needs 'correct permissions' but does not suggest how you might figure that out. Maybe when you have got things working you could improve that section?
  
  > **Comments:**
  > **username_0**: Just saw your comment. Would love to improve the section, but all I can really do is chronicle what worked as I am really just a novice. Is there somewhere I should post my notes and folks could "mold" it into an improvement? Cronjob works fine now, but the oddities of triggering "Processed as Activity: xxx" still occur.  
  > **username_1**: Don't let being a novice put you off!  If you can make any incremental improvements to the docs, that may help the next person.  Whatever you write will get reviewed before being merged which should avoid anything too glaringly wrong getting through!  
  
  ---
  
  