View Full Version : Cron jobs
10-10-2008, 01:29 AM
I have never used cron jobs before but really need to set one up that deletes files in a certain folder every Friday.
I know how to set one up to run every Friday, but I'm just not sure what the command would be to do this.
10-10-2008, 08:23 AM
Do you have shell access. or you want to delete files through php script by cpanel
10-10-2008, 12:54 PM
Or there might be an interface in the CP to set cron jobs.
10-10-2008, 06:28 PM
Yep abduraooft, that's exactly what I'm using... but I just don't know what command to use. Unfortunately, I can't just type "Delete files in tmp folder" and set it for every Friday. I don't know what fancy linux code to use :p
10-11-2008, 12:34 AM
Make sure you back up before you do this...
Command you would probably want is something like this...
/bin/rm -f /path/to/directory/with/files/
if you need to delete the files + sub dirs...
/bin/rm -rf /path/to/directory/with/files/*
If you only want to delete html files
/bin/rm -f /path/to/directory/with/files/*.html
Note /bin/rm is the path on my system. It may be different on yours.
10-14-2008, 06:38 PM
Thanks! I'll give it a shot! Take care.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.