Answers.Body: <p>The action Job.cleanup has a parameter tplCache which is set to 0 by default. When the action is called with the parameter set to 1 the folder gets emptied.</p>
  <ol>
  <li>Create a new scheduled job</li>
  <li>Choose &quot;Job&quot; as API call and cleanup as action</li>
  <li>In the parameter textfield add tplCache=1</li>
  </ol>
  <p>We chose monthly as the run frequency but this depends on your project.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-05-05T13:20:46.393Z
Answers.LastActivityDate: 2022-05-05T13:20:46.393Z
Answers.UserDisplayName: Tobias Krause
Body: <p>We realized that the folder which is set in CIVICRM_TEMPLATE_COMPILEDIR (in our case as per default: template_c) became way too large. From time to time it grew so much that we needed to empty it manually. How can this directory be emptied on a periodic basis?</p>
  
Tags: <smarty><scheduled-job><templates><cache>
Title: CIVICRM_TEMPLATE_COMPILEDIR / template_c folder becomes too large. How to empty it periodically?
ThreadText: # CIVICRM_TEMPLATE_COMPILEDIR / template_c folder becomes too large. How to empty it periodically?
  
  (Asked by: username_0 on 2022-05-05)
  
  We realized that the folder which is set in CIVICRM\_TEMPLATE\_COMPILEDIR (in our case as per default: template\_c) became way too large. From time to time it grew so much that we needed to empty it manually. How can this directory be emptied on a periodic basis?
  
  **Tags:** smarty, scheduled-job, templates, cache
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2022-05-05. Score: 3
  
  The action Job.cleanup has a parameter tplCache which is set to 0 by default. When the action is called with the parameter set to 1 the folder gets emptied.
  
  1. Create a new scheduled job
  2. Choose "Job" as API call and cleanup as action
  3. In the parameter textfield add tplCache=1
  
  We chose monthly as the run frequency but this depends on your project.
  
  
  ---
  
  