Hi. Due to my setup (authentication upon going to the URL via pubcookie using .htaccess), when I run the cronjob (cron.php) via lynx, it never "gets through" due to the instance of lynx not getting authenticated. The other option listed on this site, using wget, doesn't work at all. (I know lynx works if the site's not secured).

Is there a way that I can run cron.php directly from a command line? like, through an absolute path to it with php? Or through moving the cron.php file to another directory with a different .htaccess file?

Hope that made sense,
Charlene

Comments

sangamreddi’s picture

as of now no ideas. will test/try and let you know possible solutions..
Sunny                      
www.gleez.com | www.sandeepone.com

erikhanson’s picture

Not sure if this module (Poormanscron) helps, but it sounds like it could solve (band-aid) your issue a least until you figure out to get past the lynx issue.

sprite’s picture

Poormanscron.module should solve your problem for cron job dependent features within drupal.

I use Poormanscron.module on my drupal sites and it works fabulously.

spritefully yours

spritefully yours
Technical assistance provided to the Drupal community on my own time ...
Thank yous appreciated ...

charlener’s picture

Thanks for the advice - I've installed it and reading over its docs it seems promising.

However, I get an oddity I think I shouldn't get in its settings.

On its Home >> administer >> settings page, all I see is the word 'Array' and then the 'Save configuration' and 'Reset to defaults' button. Not too much to change, I'd think. Any ideas as to what is happening?

Thanks,
Charlene

sprite’s picture

The [ Home » administer » settings ] page should include:

-----------------------------

[ Time intervals ]
Cron runs interval:
Minimum number of minutes between cron runs. Cron will actually execute during the first page request after the interval has elapsed.
Retry interval:
The number of minutes to wait after a cron run error before retrying.

[ Logging ]
Log successful cron runs:
If you want to log successful cron runs to the Drupal watchdog, say Yes here. If those messages annoy you, disable them by selecting No.

----------------------------

I have installed this module dozens of times in various projects without problem. It should be straightforward.

spritefully yours

spritefully yours
Technical assistance provided to the Drupal community on my own time ...
Thank yous appreciated ...

guckie’s picture

It sounds like you may have installed the 4.7 or current cvs version of the poormanscron.module onto a prior drupal version (i.e. 4.6.5), or something similar. give that a check?

heine’s picture

What version of poormanscron did you install? You will need to use the 4.6 version on Drupal 4.6 and the 4.7 version on Drupal 4.7.
--
Tips for posting to the forums.
When your problem is solved, please post a follow-up to the thread you started.

greggles’s picture

Can you modify your .htaccess file to allow you to get to cron.php without authenticating?

Greg

--
Knaddison Family Blog

greggles’s picture

To answer my own question - not really.

However, this problem stuck with me and I think I have a solution - use HTTP authentication in Lynx. From the Lynx man page:

-auth=ID:PASSWD
set authorization ID and password for protected documents at
startup. Be sure to protect any script files which use this
switch.

So your con entry should be something like

/usr/bin/lynx -auth=ID:PASSWD -source http://example.com/cron.php

--
Knaddison Family Blog

charlener’s picture

hmm...that would totally work if it were just a password/login-type thing. It's the whole pubcookie aspect. This kind of idea may work...

http://mailman1.u.washington.edu/pipermail/pubcookie-users/2004-December...

thoughts?

styro’s picture

I have no idea whether this would work (not knowing how pubcookie works), but wget can use cookies...

http://www.gnu.org/software/wget/faq.html#3.2

--
Anton