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
| SitePoint Sponsor |





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





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



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





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



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

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





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



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



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!



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