function batch_cron

6.x batch.module batch_cron()
5.x batch.module batch_cron()

Implementation of hook_cron

Delete old batches from the batch_queue table. These would be normal "old" batches we no longer need, or ones that never finished for some reason and are just taking up space.

File

modules/batch/batch.module, line 264

Code

function batch_cron() {

  $older_than = strtotime("6 HOURS AGO");
  db_query("DELETE FROM batch_queue WHERE created < ? ", $older_than);

}