Closed (outdated)
Project:
Drupal core
Version:
7.x-dev
Component:
cron system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
26 Aug 2010 at 15:24 UTC
Updated:
22 Apr 2022 at 03:26 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
kevin hankens commentedHere's a patch that appends "?cron_key=" to the url http://example.com/cron.php. I also added help text to both cron-curl.sh and cron-lynx.sh instructing the users:
Since the key is only set during installation, I think that this will be a safe and reliable way to retrieve it.
Comment #2
kevin hankens commentedComment #3
moshe weitzman commentedWe might as well also say "Paste that long string to the end of the line below."
Comment #4
kevin hankens commentedHere's a slight revision:
Patch attached.
Comment #5
mnicholas commentedImagine the nightmare of a multi-site install with a different "cron_key" for each site. Why not allow cron to be run without a key when:
$_SERVER['REMOTE_ADDR'] == '127.0.0.1'
Then you can run curl so:
curl --silent --compressed --interface 127.0.0.1 http://example.com/cron.php
or wget with: --bind-address=127.0.0.1
At least then you can pen a script to loop through the all the sites.
Fetching http://example.com/cron.php from another script can cause a deadlock on a system where http requests are queued.
Comment #6
kevin hankens commentedWe've found that drush is a good fit for that exact scenario.
drush core-croninvokesdrupal_cron_run()directly, bypassing the need to know the unique cron key for each site.Comment #7
EvanDonovan commentedI think most people who want to run cron via command line already use drush, so #5 is probably not a significant problem.
Comment #8
kevin hankens commentedTagging as documentation.
Comment #9
eric115 commentedI think it's safe to close this now based on the age of the issue.