SitePoint Sponsor

User Tag List

Results 1 to 10 of 10
  1. #1
    AdSpeed.com Son Nguyen's Avatar
    Join Date
    Aug 2000
    Location
    Silicon Valley
    Posts
    2,241
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    What is the technique you use for background processing? Like when user submit a task, the user could then wait for the result by email or through a result page.

    I'm wondering how would they do that?
    Thanks
    - Son Nguyen
    AdSpeed.com - Ad Serving and Ad Management Made Easy

  2. #2
    AdSpeed.com Son Nguyen's Avatar
    Join Date
    Aug 2000
    Location
    Silicon Valley
    Posts
    2,241
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Before the thread jumps to the next page and then disappears into thin air, I'd like to hear anything that you might thing of doing such a thing, anything that you think is possible
    - Son Nguyen
    AdSpeed.com - Ad Serving and Ad Management Made Easy

  3. #3
    SitePoint Evangelist
    Join Date
    May 2000
    Location
    Canada
    Posts
    533
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    1. you take the input, and create the CODE which would have to be run, store it in a variable, into a database, learn how to build it

    2. run a script every little while via cron

    3. the script checks for the code, use eval() to execute the code from the database..

    4. Happy Coding

    -------------------------------------
    geekarea.org: php geeks?
    cogito, ergo sum

  4. #4
    AdSpeed.com Son Nguyen's Avatar
    Join Date
    Aug 2000
    Location
    Silicon Valley
    Posts
    2,241
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey, thanks for the idea of using eval()

    But how would you code cronjobs?

    (Btw, Vinay, you're in Waterloo but the city or UW?)
    - Son Nguyen
    AdSpeed.com - Ad Serving and Ad Management Made Easy

  5. #5
    SitePoint Evangelist
    Join Date
    May 2000
    Location
    Canada
    Posts
    533
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ask your host for help on cron jobs... as for me, people just tell me how often they want a binary script to run and i set it up for them .. considering PHP can run as binaries on my servers...

    about the waterloo thing, check your icq .. you sent me a message a few days ago
    cogito, ergo sum

  6. #6
    Non-Member
    Join Date
    Apr 2000
    Location
    Waco, Texas.
    Posts
    188
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Regarding conjob's:

    Create a file named 'cront' in your home dir (/home/user).
    Each entry in your cront file will look have the format

    Minute Hour Day Month Weekday [The command]

    If you wanted to update a PHP script every five minutes, you would use:

    5**** -lynx dump http://www.url.com/name.php

    every two hours:
    02*** -lynx dump http://www.url.com/name.php

    once a day
    00*** -lynx dump http://www.url.com/name.php

    once you upload the file, login through telnet and type:
    'crontab cront'

    If you want any outputed results emailed to you, at the top of the file put:
    MAILTO=your@email.com


    If I am wrong on any of this, someone please correct me




  7. #7
    AdSpeed.com Son Nguyen's Avatar
    Join Date
    Aug 2000
    Location
    Silicon Valley
    Posts
    2,241
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Rob, haven't tried, but do I need to have root access or I could just use a virtual hosting account to do this?
    - Son Nguyen
    AdSpeed.com - Ad Serving and Ad Management Made Easy

  8. #8
    SitePoint Evangelist
    Join Date
    May 2000
    Location
    Canada
    Posts
    533
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you can do it as a normal user

    personally, i dont like using lynx and other similar things, they just slow down the whole process
    cogito, ergo sum

  9. #9
    SitePoint Evangelist mad-onion's Avatar
    Join Date
    Aug 2000
    Location
    Land of the long white cloud
    Posts
    556
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    With the crontab thing...

    Does a new one overwrite the old one?
    If not how do you delete entries?

    Thanks
    SiteOptions >> Services :: Products :: Contact
    Developers of PHP, C++, Visual Basic, MySQL, and more!

  10. #10
    SitePoint Evangelist
    Join Date
    May 2000
    Location
    Canada
    Posts
    533
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    just insert a new crontab from a file... it erases the previos crontab list and adds the new one from file (thats why its good to keep the crontab file you make)
    cogito, ergo sum


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
  •