Solved

automating tasks?

Posted on 2003-12-06
13
260 Views
Last Modified: 2010-04-06
hi there, is there a way which I can make an HTML file on a site works on its own?
0
Comment
Question by:msaa
13 Comments
 
LVL 15

Expert Comment

by:Timbo87
ID: 9891137
What do you mean by "works on its own"? You can use a scripting language like PHP or ASP to streamline updating tasks. I run a PHP news script for the latest new regarding my site and it makes updating a lot more convenient. I also made some BAT files that I just double-click and they automatically upload the whole site. If you need help with either, don't hesitate to ask.
0
 

Author Comment

by:msaa
ID: 9891142
I mean I have an html file containing Javascript which downloads or does anything from another websites.. I want to make this file work on its own.. without me needing to open it in my browser.. i want it to work from the server..
0
 
LVL 15

Expert Comment

by:jimmack
ID: 9891869
You don't want an HTML page for this.  You need an application or script on the server.  You'd need to provide details about the server you're using and what you need the application/script to do.
0
 

Author Comment

by:msaa
ID: 9891877
ok, its a unix based server.. and I need it to refresh an image for example from a site..
0
 
LVL 15

Expert Comment

by:jimmack
ID: 9891893
I'm a bit confused by two of your statements that seem to contradict each other.

>> I want to make this file work on its own.. without me needing to open it in my browser

and

>> I need it to refresh an image for example from a site

Do you mean:

a) You want a page, that is being displayed in a browser, to be automatically refreshed

or

b) The server should occasionally update an image that it is storing (eg. by fetching a new image from another site)?

The server may be Unix, but what is the web/application server (Apache? Tomcat? etc.)?
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:msaa
ID: 9891901
no need for viewing.. but need to request the image only... yes
 b is correct

b) The server should occasionally update an image that it is storing (eg. by fetching a new image from another site)?

the server is Apache.. :)
0
 
LVL 15

Expert Comment

by:jimmack
ID: 9891922
Hmm.  In that case, you probably want to create a PHP script or something to do this for you.  Unfortunately (in this case), I'm a Java specialist, so I'm not sure I can help you much more.  Hopefully though, this has helped to clarify your requirements so Timbo87 might be able to make some good suggestions ;-)

0
 

Author Comment

by:msaa
ID: 9892037
if I open a webpage, which for example has a javascript and has content that refreshes periodically... I want the same thing to happen from my server and continously without needing me to open the site and the HTM page.. I guess this is only possible on Windows servers maybe?
0
 
LVL 15

Accepted Solution

by:
jimmack earned 50 total points
ID: 9892203
The platform (Windows or Unix) shouldn't make any difference.  In the case of JavaScript, the client is doing the refreshing.  Your requirement is that you do something similar on the server.

As I said, I mainly deal with Java, so if I was doing this, I'd probably have a servlet (or separate Java thread) running continuously to do the occasional refreshes.  Because Apache isn't a servlet container, you can't do this with a servlet.  That's why you need more input from Timbo87 or another expert that can explain how to do what you want with PHP or Perl or some other language that is (or is easily) integrated with Apache.

I'm sure that what you want to do is probably quite easy to someone who uses those languages ;-)
0
 
LVL 18

Expert Comment

by:SquareHead
ID: 9906103
This is totally not my bag, but it sounds like you need to execute a script, job, or batch via a cron job -- sort of like Windows' Scheduled Tasks...

I've done this on Windows servers: scheduled a VBS script to run that performs the same steps as a web page. I'm sure the Unix world has similar functionality using cron, cgi, perl, and/or PHP...
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

I will show you how to create a ASP.NET Captcha control without using any HTTP HANDELRS or what so ever. you can easily plug it into your web pages. For Example a = 2 + 3 (where 2 and 3 are 2 random numbers) Session("Answer") = 5 then we…
Shoutout to Emily Plummer (http://www.experts-exchange.com/members/eplummer26.html) for giving me this article! She did most of it, I just finished it up and posted it for her :)    Introduction In a previous article (http://www.experts-exchang…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now