Forum Moderators: open

Message Too Old, No Replies

Autofire web application

         

wancherng

1:12 pm on Apr 1, 2003 (gmt 0)

10+ Year Member



a newbie quetion:

i would like to know how can i create an application that periodically perform a background task in my web server?
this is because i need the application to auto-retrieve data of another website(others ppl's website) and automatically update the data into a database in the server(autorun for mayb every hour...etc).and i can't use scheduled tasks in my server to do this.
so, how do i start to build the application?
hope you all can help bcoz this is the first time i build a web application
and i have no idea how to start it.
thanx in advance.

chris_f

1:18 pm on Apr 1, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



wancherng,

I afraid there are only two ways of doing this:

1. Create the script to perform the task and use the task shedular to launch it (Which you have said you cannot do).

2. Create the script with an hourly meta-refresh. However, this is most unadvisable. Things could easily go wrong and you would need the window to the script open all the time.

Chris

jpjones

1:34 pm on Apr 1, 2003 (gmt 0)

10+ Year Member



As Chris_f stated,
What you need is to :

1) create a web page, which when called will run the update processes you want.

Then when 1) is complete,
2) Find a way to call the script on an hourly basis.

If you have access to a unix box that is connected to the internet 24/7, then you can schedule a cron job to call the script, using the utilities CURL or Lynx to request the url of the maintenance page. This is what I do on several sites, and it works flawlessly.

Failing that, do you have access to any other Windows box which is connected 24/7, even if it is via a broadband connection? The same could be set up on this using either Scheduled Tasks, or the AT command on Windows NT. The problem with this method is that your connection to the internet is not guaranteed, and if it should be down around the time you call the script, then your site will not get updated at the correct time.

JP