You are here

public function MailchimpCommands::cron in Mailchimp 2.x

This command will trigger Mailchimp Cron jobs.

@command mailchimp:cron @aliases mcc mailchimp-cron

@usage drush mailchimp:cron Trigger mailchimp cron jobs with configured batch size

@usage drush mailchimp:cron 50 Trigger up to 50 mailchimp cron jobs

Parameters

int $temp_batchsize: Optional max size of batch. If ommitted, will use configuration.

File

src/Commands/MailchimpCommands.php, line 29

Class

MailchimpCommands
Class MailchimpCommands provides Drush commands.

Namespace

Drupal\mailchimp\Commands

Code

public function cron(int $temp_batchsize) : string {
  $result = mailchimp_cron($temp_batchsize);
  return 'Mailchimp cron jobs triggered: ' . $result;
}