yabsoft
08-02-2006, 04:42 PM
1.How the cronjob work?
The cronjob features of MFHS will actually delete files from your server.
The files to delete consists of:
a).Deleted files at Admin panel>Files>Deleted files:These files are only tagged as deleted status at database!
b).Those files which match the cronjob condition:
[Admin Panel>Site>Conmfiguration>Cronjob setting]
Note:the setting is based on host package.But if you disabled cronjob for one host package,for example,Guest,the files that are deleted by admin or members under this host package will still be deleted from your server when the script is running!
2.Why not delete files from server directly?
Why not delete files from server directly after executing delete action from Admin panel>Files? there are 2 reason:
a).Because the files to delete may be stored in the remote servers,deleting these remoting files are time-consuming and may take admin lots of time to wait the results.
b).And these files which are tagged as deleted status can be resetted to 'normal' files again.So if admin delete some files by mistake,these files can be restored before the next cronjob is running!
3.Command line for cronjob.php
[Note:this is not required,you can run the http://yoursite.com/cronjob.php (http://yoursite.com/cronjob.php) in IE browser to delete files manaully in anytime!]
After cronjob setting is configured,you need setup cronjob on your server to execute the cronjob.php periodically at task:
The first command line:
wget -O /dev/null http://www.yoursite.com/mfhs/cronjob.php
Replace the yoursite.com to your own domain.
Or you can use the below one(command line):
/usr/local/bin/php -q /home/username/public_html/yabsoft/cronjob.php
The "/usr/local/bin/php" is the php interpreter,if you don't know it,please inquery your host company.Generally, it is "/usr/local/bin/php" or "/usr/bin/php".
"/home/username/public_html/yabsoft/cronjob.php" should be full path to the script.if you got a "can't open file" error in email,that denote your path is not the full path to the script.
The cronjob features of MFHS will actually delete files from your server.
The files to delete consists of:
a).Deleted files at Admin panel>Files>Deleted files:These files are only tagged as deleted status at database!
b).Those files which match the cronjob condition:
[Admin Panel>Site>Conmfiguration>Cronjob setting]
Note:the setting is based on host package.But if you disabled cronjob for one host package,for example,Guest,the files that are deleted by admin or members under this host package will still be deleted from your server when the script is running!
2.Why not delete files from server directly?
Why not delete files from server directly after executing delete action from Admin panel>Files? there are 2 reason:
a).Because the files to delete may be stored in the remote servers,deleting these remoting files are time-consuming and may take admin lots of time to wait the results.
b).And these files which are tagged as deleted status can be resetted to 'normal' files again.So if admin delete some files by mistake,these files can be restored before the next cronjob is running!
3.Command line for cronjob.php
[Note:this is not required,you can run the http://yoursite.com/cronjob.php (http://yoursite.com/cronjob.php) in IE browser to delete files manaully in anytime!]
After cronjob setting is configured,you need setup cronjob on your server to execute the cronjob.php periodically at task:
The first command line:
wget -O /dev/null http://www.yoursite.com/mfhs/cronjob.php
Replace the yoursite.com to your own domain.
Or you can use the below one(command line):
/usr/local/bin/php -q /home/username/public_html/yabsoft/cronjob.php
The "/usr/local/bin/php" is the php interpreter,if you don't know it,please inquery your host company.Generally, it is "/usr/local/bin/php" or "/usr/bin/php".
"/home/username/public_html/yabsoft/cronjob.php" should be full path to the script.if you got a "can't open file" error in email,that denote your path is not the full path to the script.