automating tasks?

hi there, is there a way which I can make an HTML file on a site works on its own?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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.
msaaAuthor Commented:
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..
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.
Bootstrap 4: Exploring New Features

Learn how to use and navigate the new features included in Bootstrap 4, the most popular HTML, CSS, and JavaScript framework for developing responsive, mobile-first websites.

msaaAuthor Commented:
ok, its a unix based server.. and I need it to refresh an image for example from a site..
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


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


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.)?
msaaAuthor Commented:
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.. :)
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 ;-)

msaaAuthor Commented:
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?
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 ;-)

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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...
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Languages and Standards

From novice to tech pro — start learning today.