Is possible create a scheduled task for clean the directory /httpdocs/files/tmp?

Permalink
I don't know what king of files there are on this directory, but, I want create a script on php for clear these files everyday, howers, If exists an option on concrete5 for create a schenduled task is better.

My current version is 5.6.3.4

Can you help me?

 
hayden39 replied on at Permalink Reply
Hi,
i can help with your requirement.
you can connect me on skype: cis.am4 for further queries.
also you can mail me on hayden@cisinlabs.com
Regards
Hayden
carlosibex replied on at Permalink Reply
Sorry, I was wrong forum. The idea is to ask for help.
blueatlas replied on at Permalink Reply
blueatlas
Assuming you are hosted on Linux, you can schedule this command to run daily:

find /httpdocs/files/tmp -name sess_\* -mmin +240 -exec rm -f {} \;

This command will delete session files that are over 240 minutes old. You can adjust -mmin to be above your session expiration.
carlosibex replied on at Permalink Reply
Thank you very much!. Yes, I have Linux OS.

My idea was to create a .php or .sh file and then create a scheduled task from Plesk so that it executes those files every day.

Is this code that you have given me for a .sh file?
blueatlas replied on at Permalink Reply
blueatlas
Yes, you can place that in a shell file and schedule it to run daily, or you may be able to just run it directly, depending on what options you have with the Plesk control panel.