Forum Moderators: open

Message Too Old, No Replies

Automating a task with JavaScript

load a web page at regular intervals

         

Hugene

9:46 pm on Apr 4, 2005 (gmt 0)

10+ Year Member



I have a php script sitting on a web server, and would like the php script to be loaded evry couple of hours, periodically, as it automates a daily task I have.

Now, it turns out that my server doesn not support cron jobs.

I am wondering if I can write a JavaScript, load it locally in my browser in my home machine, and leave it open to run. The script would call the php file from the web, such that the task is done.

Is that possible?

thanks

rocknbil

12:28 am on Apr 5, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It might be easier to use http refresh:

<html>
<head>
<http-equiv=refresh content="3600; url=http://www.example.com/this_page.php">

the 3600 is one hour, in seconds. Don't know how reliable it will be though.

Hugene

6:30 pm on Apr 10, 2005 (gmt 0)

10+ Year Member



thanks, I will try that

orion_rus

8:59 am on Apr 11, 2005 (gmt 0)

10+ Year Member



But u need to write it like this:
<meta http-equiv=refresh content="3600; url=http://www.example.com/this_page.php" />

good luck to you!