I'm familiar with cron, so I don't need instruction on how to set it up...
I've been working with Drupal for the past couple months and am finally getting around to setting up cron. I've found lots of info regarding what to put into the crontab file, but very sparse or no information regarding the following:
1 - What actually happens when cron.php is run? I gather it is important, but I'm not going to set it up until I understand fully what will happen once I do... Is it just checking for module updates & clearing cache? Is there more?
2 - How often should it be run? I've gleaned that the answer is dependent upon site traffic, and the site I'm building doesn't currently have much, and likely never will - probably never more than a few thousand hits per day...
3 - Most of the instructions I've found recommend running some variation of the following: "wget -O - -q -t 1 http://(mysite)/cron.php". Why run the "wget" command? Why not just call the script directly from "drupal-home/cron.php"? Again, I'm not going to implement something I don't understand, and I haven't been able to find any rationale given for choosing one over the other.
Thanks in advance for any help provided.
Comments
Answers
1. Running cron.php invokes all cron hooks that were implemented by all modules. This would include at least search indexing, cache cleanup, RSS aggregator runs, and update checking on a stock Drupal installation, but could include many other things that might be implemented by contrib modules.
2. Up to you. On a light site I usually run it a couple of times a day. More frequent runs don't hurt anything.
3. You use wget, or curl, or lynx, etc., to ensure that Drupal is running under the webserver's UID and not a regular user UID, which could cause permissions problems.
Thank you!
Excellent - thank you very much for the clear, concise answers. I appreciate it very much!
cron answer
Great answer but I need to know one more thing. How do I find what modules have hooked cron so I can figure out what one (unknown) might be doing. I suspect that one of them is running too long.
Walt Daniels