cron job

Discussion in 'Installation' started by simplifier1, Feb 25, 2011.

  1. simplifier1

    simplifier1 New Member

    Joined:
    Dec 15, 2010
    Messages:
    20
    I don't find any threads where this specific question was previously raised. Is there some particular reason why a URL must be the argument of the lynx command?

    I have amember installed in a subdomain that requires SSL. The cron job, as specified in the amember doc, did not work. So I then tried the shell command in a terminal. Lynx returned error messages that indicated it could not run the file.

    I then found an old thread in the forum that indicates lynx does not support SSL, which would seem to explain the problem.

    I then tried running the lynx command using a directory path to cron.php instead of using the URL. This time lynx ran and dumped the script source on the terminal, as requested by the -source switch.

    Is there any reason running this way will not obtain the correct results?
  2. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    Lynx is a text browser for the World Wide Web so it should accept url as argument (and not file path)
    What error message you get exactly when tryed to execute command from shell?
  3. simplifier1

    simplifier1 New Member

    Joined:
    Dec 15, 2010
    Messages:
    20
    I found a simple workaround to the problem. Possibly it may help someone else. I simply put the following code in the main site VirtualHost configuration:

    Options +FollowSymLinks
    RewriteEngine On

    # Rewrite for cron
    RewriteCond %{REQUEST_URI} ^/obscure_name/$
    RewriteRule ^(.*)$ /path/to/amember/cron.php [L]

    <Directory /path/to/amember>
    Order deny,allow
    Allow from all
    </Directory>

    Recall that the subdomain with amember is TLS-only. However, rewriting "http://www.mydomain.com/obscure_name/" to the cron script path avoids TLS entirely.

    Works a treat.

Share This Page