SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Enthusiast
    Join Date
    Jun 2001
    Posts
    83
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    crontab without telnet

    is this possible, or is another command, similar to crontab possible without telnet access?

  2. #2
    Mlle. Ledoyen silver trophy seanf's Avatar
    Join Date
    Jan 2001
    Location
    UK
    Posts
    7,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is this for the same problem you were having before (slow loading financial news)?

    If you can not use telnet there is a less efficient way to do this.

    What you need to do is have an image on your main page that calls a file, for example <img src="checkupdate.php" width="1" height="1">

    Now, everytime someone comes to your website the checkupdate program will run. You can then check the time against your database to see when the last update to the data was. If you want to update the data once every hour you can see if the current time is more than an hour from the stored time. If it is grab the financial news and store it in the database. Otherwise just grab the data from the database and print it on your page.

    This is less efficient as 1 in n visitors will experience a slow down as the script grabs the data and puts it in the database.

    Sean
    Harry Potter

    -- You lived inside my world so softly
    -- Protected only by the kindness of your nature

  3. #3
    SitePoint Enthusiast
    Join Date
    Jun 2001
    Posts
    83
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    for now, there are not enough visitors for this option
    Certainly, if we want to update it about every minute, to be realtime...

  4. #4
    Mlle. Ledoyen silver trophy seanf's Avatar
    Join Date
    Jan 2001
    Location
    UK
    Posts
    7,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by dijksma
    Certainly, if we want to update it about every minute, to be realtime...
    I dont understand what you mean by this.

    Sean
    Harry Potter

    -- You lived inside my world so softly
    -- Protected only by the kindness of your nature

  5. #5
    SitePoint Enthusiast
    Join Date
    Jun 2001
    Posts
    83
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    well, i want to refresh about every 2 to 3 minutes, so I won't face any delay. It's very important that my info is up to date...

  6. #6
    Mlle. Ledoyen silver trophy seanf's Avatar
    Join Date
    Jan 2001
    Location
    UK
    Posts
    7,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, if you don't have enough traffic to do what I said above your only solutions are to use crontab or carry on as you are.

    Sean
    Harry Potter

    -- You lived inside my world so softly
    -- Protected only by the kindness of your nature


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
  •