1

I was just wondering if anyone knew how many files the Drupal cron removes from your tmp/ directory per cron run? Is it limited to 100 at a time? Where can I see this information?

1
  • Are you asking about files being deleted from the /tmp directory on your server? or temporary Drupal file entities (i.e. from /admin/content/files?status=0)?
    – sonfd
    Jun 24, 2021 at 23:08

1 Answer 1

4

Yes, the query is set to 100 items per cron run. You can see the associated code for it in file_cron().

$fids = Drupal::entityQuery('file')
  ->accessCheck(FALSE)
  ->condition('status', FILE_STATUS_PERMANENT, '<>')
  ->condition('changed', REQUEST_TIME - $age, '<')
  ->range(0, 100)
  ->execute();

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.