[drupal-docs] update to handbook cron page?
Anisa
mystavash at animecards.org
Sat Mar 26 14:30:04 UTC 2005
so, I wrote this. A bit choppy, I dumped in large chunks from the
original handbook cron page: http://drupal.org/node/288 because I really
don't know much about this stuff. Please fix and make it more concise!
Also, I don't really know about errors, but I do think that belongs in
here too.
=======================
Cron
What it is...
Some modules require regularly scheduled actions, such as cleaning up
logfiles. Cron, which stands for chronograph, is a periodic command
scheduler executing commands at intervals specified in seconds. It can
be used to control the execution of daily, weekly and monthly jobs (or
anything with a period measured in seconds). Automating tasks is one of
the best ways to keep a system running smoothly, and if most of your
administration does not require your direct involvement, cron is an
ideal solution.
Why you need it...
Drupal core modules that need/use cron:
Search (uses cron to index it, search will not return any results if you
don't use cron.php at least once)
How to use it...
Just by going to www.example.com/cron.php with your web browser, you are
using the cron function. A blank page is a good sign here, it means it
completed successfully.
However, it's a pain to have to go to www.example.com/cron.php everytime
you want to run a cron job. The trick is how can you automate the process.
How to set up a automated cron job...
Linux/Unix users
For the Unix/Linux crontab itself, use a browser like lynx or wget but
make sure the process terminates: either use /usr/bin/lynx -source
http://example.com/cron.php or /usr/bin/wget -o /dev/null -O /dev/null
http://example.com/cron.php. Take a look at the example scripts in the
scripts-directory. Make sure to adjust them to fit your needs. A good
crontab line to run the cron script once every hour would be:
00 * * * * /home/www/drupal/scripts/cron-lynx.sh
Note that it is essential to access cron.php using a browser on the web
site's domain; do not run it using command line PHP and avoid using
localhost or 127.0.0.1 or some of the environment variables will not be
set correctly and features may not work as expected.
Shared hosting users...
Check with your host to see if they will allow you to set up a cron
job. Cpanel users may find this option in their control panel.
Host won't let you do it? You can either ask some one else to set one
up for you, or use poormanscron: http://drupal.org/project/poormanscron
Dealing with error messages...
Not the slightest clue, never gotten one. ;p Someone else write this.
============================
Anisa.
Gabor Hojtsy wrote:
>> This wget thingy... how well is it known to which people? For
>> example, if you tell a linux user, just use wget, is it like 99%
>> likely that they will go, oh OK, as opposed to, what the hell are you
>> talking about?
>
>
> IMHO it is very well known. Quite some install guides instruct you to
> download something with wget for example.
>
> Goba
More information about the drupal-docs
mailing list