Does it not need a cronjob? (delete old files)

localhost

New Member
YetiShare User
Jul 7, 2012
47
0
0
www.droidbin.com
How does the script know the age of an uploaded file by Free/non accounts to be deleted?
Normaly things like this is done by a "cronjob" that runs on a set time everyday.
In the intall info it does not say anything about this, so I guess that it's done some other way.. but how???
 

adam

Administrator
Staff member
Dec 5, 2009
2,043
108
63
Hi,

It's checked on the home page of the site, so when someone visits the site it'll downgrade any accounts/delete files.

It could also be moved into a cron but it just makes the installation process a lot smoother for people.

If you want to move it, look for the functions called downgradePaidAccounts() & deleteRedundantFiles() in index.php.

Regards,
Adam.
 

localhost

New Member
YetiShare User
Jul 7, 2012
47
0
0
www.droidbin.com
Interesting way of doing this, but does it not put extra stress on the server when the site get's really big, and lot's of users accessing?
 

adam

Administrator
Staff member
Dec 5, 2009
2,043
108
63
Hi,

It's only 2 queries but yes if the site got extremely busy you'd want to move it to a cron. I'd imagine you'd run a cron every minute so until you have more than 1440 (60*24) visits to the homepage each day, it's probably not worth worrying about.

Regards,
Adam.