Last active
June 26, 2024 10:36
-
-
Save isalmanhaider/70ae4652626b8ef7310fbada8571054a to your computer and use it in GitHub Desktop.
batch process using cron - elysia cron in Drupal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Example of setting up a batch process in Drupal that runs programmatically without user intervention | |
// Define batch operations and other batch settings as required: $batch | |
batch_set($batch); // Initialize and register the batch with Drupal's batch processing system. | |
drupal_alter('batch', $batch); // Allow other modules to alter the batch settings before it runs. | |
$batch = &batch_get(); // Retrieve a reference to the current batch array for direct manipulation. | |
$batch['progressive'] = FALSE; // Set the batch to run non-progressively, suitable for automated processes. | |
batch_process(); // Start processing the batch without expecting a user-driven progression. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment