SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Jan 2001
    Location
    Switzerland
    Posts
    57
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i have a couple of PHP scripts that i would need to run every day at midnight but the problem is PHP isn't really a language to do such things. right now i have been around this problem by storing 'today date' somewhere and then comparing it with the current date() to see if it was a new day but now with what i need to do, it wouldn't work anymore.

    anyone know how i could do that? i don't think any PHP functions can do such things. i'm thinking maybe about some cron jobs (i'm running my server under linux) but how do you launch a php script with a cron job?

    any help appreciated, it's very important

    zEBz
    zebz@hotmail.com

  2. #2
    [Call me Bram] iBram007's Avatar
    Join Date
    Feb 2001
    Location
    Belgium
    Posts
    339
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I asked already that question:
    Update automatically

    but nobody could help me

  3. #3
    SitePoint Columnist Skunk's Avatar
    Join Date
    Jan 2001
    Location
    Lawrence, Kansas
    Posts
    2,066
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I know you can run a PHP script from the command line without using a browser or anything because I saw an article in a magazine on how to do it. Unfortunatey it wasn't my magazine and I don't have access to it

    Aaaah! - Just remembered freddydoesphp posted an excellent solution to this problem that uses lynx to call the script from the command line - I'll just dig it up...

    http://www.sitepointforums.com/showt...&postid=131335

  4. #4
    SitePoint Enthusiast
    Join Date
    Jan 2001
    Location
    Switzerland
    Posts
    57
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yes it worked with lynx thanks! iBram007, if you want to do that, you'll need to have telnet access to your server. ask your host if you can have that, most hosts do.

    zEBz


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
  •