Score:1

How many temporary files will be deleted on every cron run?

gb flag

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?

sonfd avatar
in flag
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)?
Score:4
cn flag

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();
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.