public function WebformScheduledEmailManagerInterface::cron in Webform 6.x
Same name and namespace in other branches
- 8.5 modules/webform_scheduled_email/src/WebformScheduledEmailManagerInterface.php \Drupal\webform_scheduled_email\WebformScheduledEmailManagerInterface::cron()
Cron task for scheduling and sending emails.
Parameters
\Drupal\Core\Entity\EntityInterface $entity: A webform or webform submission.
string|null $handler_id: A webform handler id.
int $schedule_limit: The maximum number of emails to be scheduled. If set to 0 no emails will be scheduled.
int $send_limit: The maximum number of emails to be sent. If set to 0 no emails will be sent. Defaults to webform.settting->batch.default_batch_email_size.
Return value
array An associative array containing cron task stats. Includes:
- WebformScheduledEmailManagerInterface::EMAIL_SCHEDULED
- WebformScheduledEmailManagerInterface::EMAIL_RESCHEDULED
- WebformScheduledEmailManagerInterface::EMAIL_ALREADY_SCHEDULED
- WebformScheduledEmailManagerInterface::EMAIL_UNSCHEDULED
- WebformScheduledEmailManagerInterface::EMAIL_SENT
1 method overrides WebformScheduledEmailManagerInterface::cron()
- WebformScheduledEmailManager::cron in modules/
webform_scheduled_email/ src/ WebformScheduledEmailManager.php - Cron task for scheduling and sending emails.
File
- modules/
webform_scheduled_email/ src/ WebformScheduledEmailManagerInterface.php, line 294
Class
- WebformScheduledEmailManagerInterface
- Provides an interface for managing webform scheduled emails.
Namespace
Drupal\webform_scheduled_emailCode
public function cron(EntityInterface $entity = NULL, $handler_id = NULL, $schedule_limit = 1000, $send_limit = NULL);