Daily Job
This
job must run each day after midnight. It resets all statistic of the previous
day, sends daily emails and many more. If you are interested what exactly it
makes, take a look to Administration => Reset/rebuild. Note that it's very important to run the daily job immediately after midnight
to have the statistic as accurate as possible.
There are 3 different ways to run this job:
Automatically
- Check field "Run the regular jobs
automatically" in your Configuration. This is a very easy way but it needs additional
system resources and it is not recommended. You should never use this way if you
have more than 50,000 impressions/day because it may be too difficult for your
server.
By Crontab (Linux) or Task Manager
(Windows) - it's the best way but there is needed a little more setting.
You can read below how to set a Crontab job on your server. If you use
this way, never check the field "Run
the daily job
automatically" in the Configuration.
Manually - You can run this
job manually in the Administration. Note that if you run it in other time than after
midnight, it can damage the daily and monthly statistic.
Using Crontab
If you didn't
use Crontab before, please go to http://webmasterworkshop.com/guides/crontab_guide.shtml
to a simple info about it.
You will need to figure out if you will be using
lynx or wget or GET to perform the Cron tasks. These are programs that are
commonly available on Linux and Unix servers, but not always. You will need to
locate one of these programs on your server. If you do not know where they can
be found, contact your server administrator to get that information. You will
need the full path to the program (ie. /usr/bin/lynx).
Note that
if you set up in your Configuration that time on the server is different from
a real time, you must move also the Daily Job. For example if there is +2 hours
difference, you have to run the Daily Job after 2 am.
1 0 * * * /path/to/wget --spider -q 'http://www.yourdomain.com/rebuild.php?word=yoursecretword'If you will be using lynx, the line is:
1 0 * * * /path/to/lynx -dump 'http://www.yourdomain.com/rebuild.php?word=yoursecretword' >/dev/nullIf you will be using GET, the line is:
1 0 * * * GET 'http://www.yourdomain.com/rebuild.php?word=yoursecretword'
You must replace "/path/to/wget"
or "/path/to/lynx" with real path to wget or lynx.
You
also must replace "http://www.yourdomain.com/rebuild.php"
by a real URL of your rebuild.php file. Also replace "yoursecretword"
by your secret word you have entered in the Configuration.
These
are only examples. You may want to change the times if you
are familiar with Cron.