Find the answer to your Linux question:
Results 1 to 10 of 10
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Question CronJob Run/Call URL Problem

    Hi all
    I wanna try to run a auto e-mail member for birthday,
    I have a mode manuelly installed and it is running seamlessly
    When I put below URL to the browser and hit to ENTER it runs and send e-mail to the members (controlled)

    this URL running;

    What I want to do is that;
    I wanna run a CronJob daily at 08:00 which launchs this URL

    There is no problem with scheduling
    But I tear my hair what is the correct command?

    wget -q

    Any idea?

    Cant write exact URL: You are only allowed to post URLs to other sites after you have made 15 posts or more.

    Any idea?

  2. #2
    Does that wget command not work, i.e., does it not send the email? I made a simple php script that accepts arguments and did a wget of it and it worked just fine.

    Post wget output, if anything there is helpful. Is there anything in the apache log (usually /var/log/httpd/error_log) or the cron log (usually /var/log/cron)?

  3. #3
    If i put this line to the command field

    wget -q /home/mysite/public_html/forum/index.php action=dogumgunu

    CronTab says: AJAX Error
    Please refresh the page and try again.

  4. $spacer_open
  5. #4
    Aren't you running a local webserver? Otherwise, there's no point in using wget. If you start a webserver (assuming you have one installed and configured w/PHP), then try:

    wget -q action=dogumgunu
    Does that give you the same response?

    However, if there are AJAX errors...then does the page need to be dynamic/require user interaction for the email to be sent?

  6. #5
    I am using my webserver (Not local)

    Same Ajax Eror returns for your last command (The command that you wrote your last message)

    PS: I hate this message: You are only allowed to post URLs (http, ftp, @) to other sites after you have made 15 posts or more.

  7. #6
    Just use hxxp instead of http.

    Can you answer my other question: does the webpage require user interaction in order to send the email? If not, what is AJAX doing in the page that is required?

    If the page must be loaded in a browser to work, you could run an X virtual frame buffer, and run firefox using --display= to point to the frame buffer display and pass the URL to it.

  8. #7
    First of all I am using SMF forum, (
    a php file (with scripts) sending birhtday email to the users/members
    There is a file in forum/sources folder (named dogumgunu.php)
    Within this file;
    function DogumGunu ()
    The path of Dogumgunu php file is .../forum/themes/default/Dogumgunu.template.php

    So, finally when I execute/run this URL [] it sends email
    It is manuelly...

    Does it an answer for your qoestion?

  9. #8
    Do you have to log in to the SMF page first, before loading your birthday page? I thought this was a webserver under your may not be able to do this, as the client/server interaction provided by the browser is likely required for you to load the page properly.

    A way to test that might be to just run firefox (assuming that is your browser) from the command line, loading the URL. First close all instances of your browser (and clear the cache too). Then run it from the command line:

    Does that work as expected, w/o interacting w/the page at all?

  10. #9
    No error log (I cant find)

    When I put this command to the Crontab Command field

    firefox hxxx://
    An e-mail arrived with this message
    /bin/sh: firefox: command not found

  11. #10
    Yeah, the apache error log is only for checking if you are running a local webserver - disregard.

    Where is firefox installed? Is firefox what you are using to browse SMF?

    Do this:
    which firefox
    It is probably /usr/bin/firefox, but maybe not. Anyway, it is always good practice to use the full path to your commands/scripts/program in your cronjob.

    But, I would not put firefox in your cronjob in the first place. Just run that command from the terminal to see if it works at all.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts