function views_bulk_operations_cron in Views Bulk Operations (VBO) 7.3
Implements hook_cron().
Deletes queue items belonging to VBO active queues (used by VBO's batches) that are older than a day (since they can only be a result of VBO crashing or the execution being interrupted in some other way). This is the interval used to cleanup batches in system_cron(), so it can't be increased.
Note: This code is specific to SystemQueue. Other queue implementations will need to do their own garbage collection.
File
- ./
views_bulk_operations.module, line 83 - Allows operations to be performed on items selected in a view.
Code
function views_bulk_operations_cron() {
db_delete('queue')
->condition('name', db_like('views_bulk_operations_active_queue_') . '%', 'LIKE')
->condition('created', REQUEST_TIME - 86400, '<')
->execute();
}