HostNed.comHostNed Forums
Welcome, Guest. Please login or register.
Did you miss your activation email?
November 19, 2008, 05:52:20 AM
256 Posts in 93 Topics by 71 Members
Latest Member: sclemens
Home Help Search Login Register
HostNed Forums  |  WEB HOSTING  |  Linux Hosting  |  Topic: Cron Jobs 0 Members and 0 Guests are viewing this topic. « previous next »
Pages: [1] Print
Author Topic: Cron Jobs  (Read 961 times)
avatarweb
Newbie
*
Posts: 3


View Profile
Cron Jobs
« on: May 02, 2007, 12:30:55 PM »

Hi Mr Dynaweb (as it looks like you who always replies to these things, but hello to anyone else who wants to help too:)

I want  to add a cron job to run every day, which deletes all files in a certain directory that are more than 3 days old.

I have gone to the Cpanel, and adding a job looks fairly straightforward, but before entering commands I want to make sure I know what I'm doing.

I have very little unix experience (only that which I have gained form running hosted websites for a few years), and want to make sure I know the commands that will filter the set of files being deleted to ONLY those older that 3 days.

As a side issue, these files are created by a php script running on the site, so I wonder about the permissions, and I wonder if there is a heirarchy to how permissions are structured. (for example is there a user 'apache, or php who may be the owner of the files?)
Logged
Dynaweb
Yep
Administrator
Full Member
*****
Gender: Male
Posts: 111


HostNed Admin


View Profile WWW
Re: Cron Jobs
« Reply #1 on: May 03, 2007, 10:55:14 PM »

Hi,

This can be done through cron.  I have to ask first, in this certain directory, will there be only files in there or files and sub-directories?

As for file ownership, I believe that if the file is owned by PHP or Apache, your user would not have permission to delete it, but that can be worked out with the HostNed techs through a support ticket.  For example, Hostned could set a root cron to change all files in a certian directory to oyur owner daily.
Logged
Pages: [1] Print 
HostNed Forums  |  WEB HOSTING  |  Linux Hosting  |  Topic: Cron Jobs « previous next »
Jump to: