Results 1 to 9 of 9

Thread: Cron Job with WebCalendar 1.0.2

  1. #1
    Join Date
    Feb 2006
    Posts
    8

    Default Cron Job with WebCalendar 1.0.2

    I have talked to support, who could not immediately resolve this issue. I was told that they'd get back to me. Not as of yet.

    What is the Cron Job command line to execute the "send_reminders.php" file in WebCalendar?

    Before you ask me to search the knowledge base and/or research it on the web, know that I've spent at least two hours trying a variety of things...and support spent 30 minutes while I was on the phone, and nothing works as of yet.

    Whenever I execute the file through its URL directly in a browser it works flawlessly, sending test reminders that I've entered for the purpose.

    Thanks in advance for a quick response...

    Deacon

  2. #2
    Join Date
    Feb 2006
    Location
    West Texas
    Posts
    159

    Default

    Have you tried wget?

    This cron job is what I use to update a news site each hour:
    Code:
    0 * * * * nice wget -q -O /dev/null "http://www.yoursite.com/path/to/webcalendar/send_reminders.php
    To get it to execute every 30 minutes:
    Code:
    00 * * * * nice wget -q -O /dev/null "http://www.yoursite.com/path/to/webcalendar/send_reminders.php
    30 * * * * nice wget -q -O /dev/null "http://www.yoursite.com/path/to/webcalendar/send_reminders.php
    If "send_reminders.php" has includes, you may have to build a short php script with the includes and call "send_reminders.php" in that script. Then you would set the cron job to call your new script.
    .:2notch:.
    Registered Linux User #223476

    RecruitPress - The Job Board Built On WordPress
    CC licensed blog header art http://www.digitalwestex.com/gallery/

    Always remember that you are unique. Just like everybody else.

  3. #3
    Join Date
    Feb 2006
    Posts
    8

    Default

    Thanks, I tried this format before BUT without the 'nice' prefix. Let's see how these work...

    Deacon

  4. #4
    Join Date
    Feb 2006
    Posts
    8

    Default

    No go.

    Nothing. Matt??????

    Deacon

  5. #5
    Join Date
    Feb 2006
    Posts
    11

    Default

    What happens when you try wget? What error do you get that makes it a "no go"?
    Matt

  6. #6
    Join Date
    Feb 2006
    Posts
    8

    Default

    It's hard to say what I get. Right now the machine that I do all this on won't recognize port 80 so I can't work on it. Maybe tomorrow.

    Deacon

  7. #7
    Join Date
    Feb 2006
    Posts
    8

    Default

    Back on the desktop.

    Here's what I've done to make this work...everytime. I've set the URL to the send_reminders.php file to load automatically via a tab in Firefox. So you can see that if the page loads, the internal scripting is working properly, including the settings.php, which is called and is in the folder, too.

    Now, to get the url to load using the Cron Manager.....IOW, give me the surrounding syntax and, with my url, it should work.

    Deacon

  8. #8

    Default

    This is the non wget option.

    Code:
    */15  * * * * cd /home/user/calender/tools; ./send_reminders.php
    Can't remember if I had to chmod +x send_reminders.php

    I had to change the shebang to #!/usr/bin/php -q

    And also added the following hack:
    Code:
    chdir(".."); // HACK
    include "$includedir/config.php";

  9. #9
    Join Date
    Feb 2006
    Posts
    8

    Default

    We'll try it, though I can't really undestand the full syntax...

    Deacon

Posting Permissions

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