New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Comments
run it every 30 minutes, then just make it execute a script that tells it what files/folders and where they are?
Your best bet is to find a script (I'm sure their are many) on google that deletes files based on their time (in your case 30min), then just schedule it every 1 minute in the crontab.
Am using this
/40 * * * * rm -rf /var/www/vhosts/mp3/
but the above deletes every 30 minutes. But i need the code which delete after the file get 30 minutes old
30 * * * * rm -rf /var/www/vhosts/mp3/ ?
0,30 * * * * rm -rf /var/www/vhosts/mp3/* will delete @ the top and bottom of the hour for every hour.
I have setuped a delet.php file. I need that to be executed every 15 minutes how?
@George_Fusioned @Mun
15 * * * * php /path/to/ur/file
Not working
0,15,30,45 * * * * php /path/to/ur/url
edit: or */15 * * * * php /path/to/ur/url
@George_Fusioned nailed it - you have to use find. But I think you want rm -f, not rm-i
http://bit.ly/WtEhSp
Dats snappy mate.
Ah, I was first writing my reply saying he should use -i to test it out first.
Then I was sure it's correct, so I edited my post, but forgot to change the -i
It makes me happy to see some true bash programming :-) Not the way too easy overused PHP