Still on Drupal 7? Security support for Drupal 7 ended on 5 January 2025. Please visit our Drupal 7 End of Life resources page to review all of your options.
Cron Roles is a simple module to grant admin-selected roles to the anonymous user that cron tasks run as.
There are many tasks we want cron to be able to perform which anonymous cannot. In my case this was reading completed Commerce orders for an asynchronous fulfillment routine. This module provides two scopes in which you can add the roles