SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Addict scoobasteve1982's Avatar
    Join Date
    Apr 2007
    Posts
    333
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    My frist cron job..wont run.

    Hi there,

    Okay so we have Webmin here at the office and I have the option of setting up Cron jobs. I'm not too sure how to set them up because I'm not familiar with Linux. I have to issue a command during the scheduled time to run a PHP script and I'm not sure if I'm doing it right. I'm simply providing the path to the PHP file. Something tells me this is completely wrong. I know it shouldn't be that easy. Is there any other commands I need to issue before them and if so, what are they? Any help would be greatly appreciated. Thanks.

  2. #2
    SitePoint Addict
    Join Date
    May 2005
    Location
    London, ON
    Posts
    360
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You might want to try:

    php path/to/your/php/file.php

    If that doesn't work you can try executing it using curl:

    curl http://www.yoursite.com/yourfile.php
    Ryan Price
    Subscribe to my blog for regular tips and tricks

  3. #3
    Worship the Krome kromey's Avatar
    Join Date
    Sep 2006
    Location
    Fairbanks, AK
    Posts
    1,621
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    wget is another option if you don't have curl:
    wget http://www.yoursite.com/yourfile.php
    PHP questions? RTFM
    MySQL questions? RTFM

  4. #4
    SitePoint Addict scoobasteve1982's Avatar
    Join Date
    Apr 2007
    Posts
    333
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks to kromey and Jeanco..I got it to work

  5. #5
    Working on it... Contrid's Avatar
    Join Date
    Apr 2006
    Location
    Online
    Posts
    955
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by scoobasteve1982 View Post
    Thanks to kromey and Jeanco..I got it to work
    Out of interest...
    What was the solution?
    And so I got lost in code...completely asphyxiated by it...

    Premium WordPress plugins - Tribulant Software

  6. #6
    SitePoint Addict scoobasteve1982's Avatar
    Join Date
    Apr 2007
    Posts
    333
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    wget worked for me.


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
  •