Hi There, V9.1.1
The new tasks allow automation of common tasks but I would like the ability to create my own scheduled task or you should extend the list of capabilities.
I want to automatically expunge files that are uploaded to a directory after a certain time period has expired, i.e. 90, 180 or 365 days, maybe even longer like 3 years.
Can the tasks be enhanced to allow this to occur? It would only be a specific directory and could include subfolders or not.
You can write code to create your own tasks, see the docs at Tasks :: Concrete CMS
You could write a shell script and run it with cron.
My Extreme Clean addon includes a concrete task within which any of the Extreme Clean cleaners can be run. Extreme Clean - Concrete CMS
Extreme Clean includes cleaners for clearing out /tmp and /incoming files directories. So if it is /tmp or /incoming you need to periodically clear, you can set that up with Extreme Clean with no custom code.
If you have another directory in mind for periodic clearing, you could, with some custom code, create a new cleaner.
The general process would be to copy the Temporary Files cleaner to the relevant location and namespace in your own package (or /application), rename the class and cleaner name for your new cleaner, then modify the directory cleaned to the directory you want to clear out.
Hi @peachautomation If you are familiar with cron jobs, you can set a schedule in the CMS. Advanced: Task Scheduling :: Concrete CMS
What I am understanding is you are suggesting a way to schedule without a developer or cron expressions.
Another use case, marketers can schedule up a sitemap to run weekly using a date picker with a few options. Is that along the lines of improvements you are thinking?
I’d rather not develop a cron, I was looking for something more user friendly within the interface, as I am not really a developer or sysadmin anymore.
use case: Admins can schedule a weekly deletion task on files older than X days from the following file manager locations (select them).
Actually I’ve configured the scheduler now and it’s not too bad. Just need the task and the configuration options added to the task list.
The scheduler would also be nice if it had a dropdown for some of the common CRON tasks, like once a month, once a week etc…, but it’s just a value add. My CPanel platform suggests and helps you build the cron job. If it did this it would be cool.
John, I’m tempted to purchase but can you confirm that this cleaner will remove files that have been uploaded into the DB. At the file system level the files uploaded appear to create new folders for every file that is uploaded so I can’t see any relationship from the directory I want to clean and the other folders.
Extreme clean does not have a cleaner for a user selected host file system directory. It has cleaners specifically targeted at the host directories /application/files/incoming and /application/files/tmp . Those cleaners can be configured to remove files older than XX days.
It also has general cleanups within the Concrete file manager to clean out files that are left in the randomly generated directories such as /1234/5678/9012/ etc., but no longer indexed by the file manager.
If I understand your requirement, you want to clean a specific host filesystem directory. If that directory is covered by the above, then Extreme Clean does what you need out of the box.
If that directory is not covered by the above, you would need to code a new cleaner class based on an existing cleaner such as the Temporary files cleaner.