Body: <p>When we create an activity, we sometimes add files to these activities. The added files are mostly jpg, png or pdf files. However, these files have a single use. In other words, I do not need to keep the attachment of the file after reaching the assigned activity by e-mail.</p>
  
  <p>For this reason, I want all the data in the folder to which the files are added to be deleted automatically at certain times. Can I do this from the Scheduled Tasks area? If so, how can I do it. Can you give detailed information.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-01-24T09:05:43.140Z
Comments.Text: You could easily delete a folder using your system's cron (if you have access), however that would leave lots of db entries expecting files that now don't exist, which may cause problems. Sounds like you'd need someone to write you a custom extension to do this. Alternatively you could use civirules to delete the activities themselves, but I suspect you want to keep those..
Comments.UserDisplayName: artfulrobot
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-01-25T08:30:00.680Z
Comments.Text: You are absolutely right. DB records will stop even if the files are deleted. This may be a problem in the long run. However, it is not possible for me to write an extension for this. It was a pity that my request remained the result. Thank you for the info.
Comments.UserDisplayName: Fatih ATEŞ
Tags: <joomla><activities><cron-job><files>
Title: Deleting the Upload Folder at Specific Times
ThreadText: # Deleting the Upload Folder at Specific Times
  
  (Asked by: username_0 on 2020-01-24)
  
  When we create an activity, we sometimes add files to these activities. The added files are mostly jpg, png or pdf files. However, these files have a single use. In other words, I do not need to keep the attachment of the file after reaching the assigned activity by e-mail.
  
  For this reason, I want all the data in the folder to which the files are added to be deleted automatically at certain times. Can I do this from the Scheduled Tasks area? If so, how can I do it. Can you give detailed information.
  
  **Tags:** joomla, activities, cron-job, files
  
  > **Comments:**
  > **username_1**: You could easily delete a folder using your system's cron (if you have access), however that would leave lots of db entries expecting files that now don't exist, which may cause problems. Sounds like you'd need someone to write you a custom extension to do this. Alternatively you could use civirules to delete the activities themselves, but I suspect you want to keep those..  
  > **username_0**: You are absolutely right. DB records will stop even if the files are deleted. This may be a problem in the long run. However, it is not possible for me to write an extension for this. It was a pity that my request remained the result. Thank you for the info.  
  
  ---
  
  ## 0 answers
  
  