Cronjobs on any server

Discussion in 'PHP' started by kc3, Mar 7, 2006.

  1. #1
    Okay, I was wondering if there was a way to setup cron jobs on any server with a php script so a php script would get excecuted at certain times automaticaly but not dependant on how php is installed. Could someone help me with this?
     
    kc3, Mar 7, 2006 IP
  2. frankcow

    frankcow Well-Known Member

    Messages:
    4,859
    Likes Received:
    265
    Best Answers:
    0
    Trophy Points:
    180
    #2
    You would have to get this info from your host

    Cron is not dependant on PHP
     
    frankcow, Mar 7, 2006 IP
  3. kc3

    kc3 Peon

    Messages:
    857
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Yeah, though is there possibly another solution to this?
     
    kc3, Mar 7, 2006 IP
  4. frankcow

    frankcow Well-Known Member

    Messages:
    4,859
    Likes Received:
    265
    Best Answers:
    0
    Trophy Points:
    180
    #4
    not that I'm aware of
     
    frankcow, Mar 7, 2006 IP
  5. luxinterior

    luxinterior Peon

    Messages:
    231
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Not sure if this is what your looking for but you can try a service like www.cronservice.co.uk for free to see if it suits your needs. - shameless plug but a great service :D

    Lux
     
    luxinterior, Mar 7, 2006 IP
  6. kc3

    kc3 Peon

    Messages:
    857
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Thank you both for your help, but I need a solution for a script I'm making for someone else and I don't know how he'd like to use a service like that. I will keep a lookout, I believe I may have an alternative way of running it though I will have to see if it's alright. :)
     
    kc3, Mar 7, 2006 IP
  7. GeorgeB.

    GeorgeB. Notable Member

    Messages:
    5,695
    Likes Received:
    288
    Best Answers:
    0
    Trophy Points:
    280
    #7
    1) As stated cron is not dependent on PHP so it doesn't matter how PHP is configured.

    2) Log into your cpanel account and click on the cron setup link. It's pretty easy.
     
    GeorgeB., Mar 7, 2006 IP
  8. kc3

    kc3 Peon

    Messages:
    857
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Yes, I know, but I was wondering how to make a php script do this on its own. I know that cron jobs are not dependant on php, it's the working with it via php than I want to know.
     
    kc3, Mar 7, 2006 IP
  9. frankcow

    frankcow Well-Known Member

    Messages:
    4,859
    Likes Received:
    265
    Best Answers:
    0
    Trophy Points:
    180
    #9
    you can't
    the nature of PHP (or any server-side script) is that it's executed when called by the server (when a visitor requests it). There's no way to change that
     
    frankcow, Mar 7, 2006 IP
  10. kc3

    kc3 Peon

    Messages:
    857
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Okay, well, I think I may have another alternative. :)
     
    kc3, Mar 7, 2006 IP
  11. frankcow

    frankcow Well-Known Member

    Messages:
    4,859
    Likes Received:
    265
    Best Answers:
    0
    Trophy Points:
    180
    #11
    what's that?
     
    frankcow, Mar 7, 2006 IP
  12. kc3

    kc3 Peon

    Messages:
    857
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #12
    I mean an alternative to having it run the script every so often. lol Just so the fields have an expiration time set to it and if it's passed that field doesn't get picked up, that's all.
     
    kc3, Mar 7, 2006 IP