Server Cron Job

Discussion in 'Programming' started by JSalvador, May 8, 2007.

  1. #1
    Hi,

    My server doesn't support cron jobs, but I have a script that I need to run through a cron. Is there a way I can do this?

    I have another server that does support cron... is there a way to use that to run a file on a different server? if so what would the cron command be?
     
    JSalvador, May 8, 2007 IP
  2. iduchesne

    iduchesne Peon

    Messages:
    205
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Either you run the script manually.

    As for using another server to run a script with cron... not sure it's possible, never tested that. Specify the url in the cron job task and see if it works.
     
    iduchesne, May 8, 2007 IP
  3. JSalvador

    JSalvador Peon

    Messages:
    31
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Im using cPanel right now and I tried just setting the command to the url of the script file... But that didnt work. Is there a way that I can set up a file on the cron server that runs the script remotely? maybe?

    I just want to run the script regularly through cron... and I'm open to any ideas. Thanks
     
    JSalvador, May 8, 2007 IP
  4. webster13045

    webster13045 Peon

    Messages:
    878
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #4
    whats the script?
     
    webster13045, May 8, 2007 IP
  5. JSalvador

    JSalvador Peon

    Messages:
    31
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    the script is batch updates certain parts of my site
    if i had the url at something like:
    http://www.*****.com/batch/index.php

    Is there a way to run a cron on it through a different server?
     
    JSalvador, May 9, 2007 IP
  6. bochgoch

    bochgoch Peon

    Messages:
    1,918
    Likes Received:
    67
    Best Answers:
    0
    Trophy Points:
    0
    #6
    You can schedule a cron job on the server that you can run cron jobs on to wget a script (php or similar) on the other server .... You cron entry would look like:

    * * * * * wget http://www.*****.com/batch/index.php

    (replace the * with your date / time parameters)

    ...index.php on http://www.*****.com/batch/ will then run at the intervals you specify.
     
    bochgoch, May 9, 2007 IP
  7. abdussamad

    abdussamad Active Member

    Messages:
    543
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    60
    #7
    You can also try a free service like http://www.webcron.org/index.php?&lang=en . After you register and set it up it will access a web page according to the schedule you have specified thereby executing your script.
     
    abdussamad, May 15, 2007 IP
  8. leksa

    leksa Active Member

    Messages:
    432
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #8
    more easiest if you try in cpanel function there..because its default set for cron in your server if its not works, maybe you should ask your provider.. :)

    use 3rd partit will good too.
     
    leksa, May 16, 2007 IP