refresh url once a day

rgb192
rgb192 used Ask the Experts™
on
refresh url (not on my server --call it google.com) once a day at 8am

I am using windows7 (but have access to linux also)

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Commented:
Not sure I understand - you need the browser to automatically refresh itself at 8am - just like someone hitting the F5 key?
I think this is done more in the source of the webpage rather than on the application itself.
Maen Abu-TabanjehNetwork Administrator, Network Consultant
Top Expert 2011

Commented:
what do you want to do? details are missing , please post details to help you
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Commented:
Here is an add-on for Firefox:
ReloadEvery 7.0.0
Reloads web pages every so many seconds or minutes.

https://addons.mozilla.org/en-US/firefox/addon/reloadevery/
Maen Abu-TabanjehNetwork Administrator, Network Consultant
Top Expert 2011

Commented:
you are using windows 7 , why the zone is linux?
Gerwin Jansen, EE MVETopic Advisor
Most Valuable Expert 2016

Commented:
Hi, on what machine do you wish to refresh which URL? Is it some sort of 'news' system that has to refresh at the beginning of the day? Please explain a bit more, thanks.
Most Valuable Expert 2011
Top Expert 2016

Commented:
Do you want to read the HTML once a day?  Are you using a browser?  
digus' solution works perfectly for Firefox, I use it daily on several systems that require 15 minute updates - but you can set it to update at any time.  Just remember to enable it and not just set the time.

Author

Commented:
the firefox addon 'reload every' will not allow me to reload a webpage once a day


the url I wish to load once a day is one where email will be sent

if it is reloaded too many times, then many emails are sent


i am using windows 7, but will consider doing this in ubuntu linux
Having a program rely on a browser window refreshing to send an e-mail is a very bad idea for many reasons. You should set something like this as a CRON job.

That said, use reload every, right click the window and choose Reload, and set it for Custom with 1440 minutes (you can type the number in - you don't have to use the values in the drop down).

It will work.

Commented:
Setting it to 1140 minutes will reload the page every 24 hours.
1140 is 19 hours.

1440 is 24 hours.

Commented:
Good catch..;)
It's a number I reference often in code. :)
Most Valuable Expert 2011
Top Expert 2016

Commented:
the url I wish to load once a day is one where email will be sent
if it is reloaded too many times, then many emails are sent


If I understand this correctly, you have a GET-method script that will send an email any time someone accesses the URL?  I would not do it that way; I would use a CRON job instead.  And since this takes an action that is more than simply data retrieval, you must not use a GET request to trigger it.  GET is only for data retrieval from server to client.  Technically you may not be changing your data model when the email is sent, but you're changing the recipient's data model.  

Also, I would make sure that this script is not where it can be found by a web browser or Google.  Put it outside of the WWW root, just to be safe.

Commented:
In your terminal type

crontab -e

and add the following line at the bottom

1 0 * * * curl "http://yoururl.com" > /dev/null

This will call on yoururl.com one minute past midnight every night.

Author

Commented:
this is the easy (may not be the best) solution I used

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial