Solved

automating tasks?

Posted on 2003-12-06
13
261 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to translate path in URL with PHP? 11 39
ColdFusion Rereplace 3 72
replace quotes with UTF-8 character 38 86
Facebook React and SyntheticEvents 6 50
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…
Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

867 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

24 Experts available now in Live!

Get 1:1 Help Now