Welcome to the JaguarPC Community
JaguarPC
Sales: (888) 338-5261
Support: (888)-551-3050
Results 1 to 2 of 2

This is a discussion on Cron Job Help! in the Shared & Semi-Dedicated forum
Hey guys, I've written a PHP script to update some info in my SQL DB. The script runs perfectly in the browser so I set ...

  1. #1
    Registered User
    Join Date
    May 2002
    Posts
    16

    Cron Job Help!

    Hey guys,

    I've written a PHP script to update some info in my SQL DB. The script runs perfectly in the browser so I set a cron job to run it automatically.

    In the timing section of the cron setup I entered */10 in the minutes, which as I understand it should run the script every 10 minutes.

    In the script part I entered "GET http://www.mysite/script.php > /dev/null" without the speech marks and with the correct path, obviously.

    After all that the script never runs, I don't even get an email back to give a reason for it to fail.

    Does anyone have any ideas what I am doing wrong?

  2. #2
    Community Leader jason's Avatar
    Join Date
    Sep 2001
    Location
    Rochester, NY
    Posts
    6,003
    The "> /dev/null" in the command redirects all output from your script to /dev/null, the Unix black hole. Anything directed to /dev/null is simply discarded. It is there to easily get rid of script output, such as that from your cron job.

    If you want to get the output from your script sent to you, just remove the "> /dev/null." When you do that you will get an email every 10 minutes (to your main email account, cpaneluser@yourdomain.com)--144 of them a day.

    --Jason
    Jason Pitoniak
    Interbrite Communications
    www.interbrite.com www.kodiakskorner.com

Bookmarks

Posting Permissions

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