How to make my Mac automatically visit a web page once a week?

Discussion in 'macOS' started by nagromme, Feb 17, 2013.

  1. nagromme macrumors G5

    nagromme

    Joined:
    May 2, 2002
    #1
    Can I schedule my Mac to visit a web page once a week, assuming that my Mac user account IS logged in, but the screen is sitting on the Login Window? I don't need to SEE it happen, I just need the server to receive the hit.

    Long story short: I've got a webmail account that only gets an email once or twice a year, but in theory it could be important. So I have it forward all messages to my main email. So far, so good!

    BUT, through a quirk I'm unable to control, it will stop forwarding after a time if I don't actually visit the webmail page. So I have been visiting the bookmark once a week to be safe. I just visit the link and close it without a glance. (I don't even need to log in—I have the site set to "Remember me" so I'm always logged in.)

    I want to forget about it and not have to manually go to that bookmark every week. I want my Mac to go there on it's OWN once a week. Here's my plan so far:

    • Set Energy Saver prefs to wake my Mac one day a week (maybe 4:00 AM, so it would never interfere with anything else). Sleep again after 20 minutes.

    • Set a repeating iCal event to trigger an "Open File" alarm 10 minutes after the Mac wakes.

    • Have Open File launch an Automator action that goes to the desired URL.

    BUT, I'm pretty sure it wouldn't work if the Mac is Sitting on the login Window. My account IS logged in (orange check)... is that enough to make the URL visitation happen?

    Is there a better way, before I start experimenting?

    (For security, I don't want to leave my account just running password-free in my apartment. That means it's impossible to wake my Mac without a password--it would just go right back to sleep. UNLESS I leave it on the Login Window. Which I do anyway, for the sake of my EyeTV DVR which needs to wake the Mac to record shows. So: leaving it on the Login Window allows my Mac to wake without a password, so that my logged-in user account can "do stuff" in the background.)

    Thanks in advance!

    (P.S. I thought about something with Terminal and curl, but that wouldn't keep me permanently logged in the way a browser does: curl would just fetch the HTML of a "Please Log In" page. No good.)
     
  2. overanalyzer macrumors 6502a

    Joined:
    Sep 7, 2007
    Location:
    Boston, MA USA
    #2
  3. gr8gatzby macrumors member

    Joined:
    Jul 10, 2001
    Location:
    Charlotte, NC
    #3
  4. nagromme thread starter macrumors G5

    nagromme

    Joined:
    May 2, 2002
    #4
    Many thanks! I'll experiment, and those two techniques may help me solve the limitations of Automator if I bump into them!
     
  5. dirt farmer macrumors 6502

    Joined:
    Feb 23, 2005
    #5
    How about using iCal?

    Drag the website page to your desktop (or anywhere else), creating a webloc link.

    Create a "repeat" event in iCal for once a week.

    Then, under "alarm", pick "open file". Choose the appropriate webloc.

    Hey, it may not work, but it's worth a shot!
     
  6. freejazz-man macrumors regular

    Joined:
    May 12, 2010
    #6
    how about getting a real email address?

    nothing like solving the root cause
     
  7. nagromme thread starter macrumors G5

    nagromme

    Joined:
    May 2, 2002
    #7
    Yes, iCal was my plan, but I wasn't sure what actions it could take from the login window. I'll experiment in a week or two when I have time. Should be interesting!

    Of course I would if I could: but I'm not in control of this particular notification system (and my needs are not a priority for those who are); thus, I can't make notifications go anywhere else, and must use forwarding as a workaround. Long story. Eventually either they'll improve the system or, in time, I won't care anymore! Meanwhile, I'll automate as much as I can from my end.
     
  8. justperry macrumors 604

    justperry

    Joined:
    Aug 10, 2007
    Location:
    In the core of a black hole.
    #8
    There's also this Java script but Safari needs to be open, if you bookmark this and click on it it will ask the page address first and then you can specify the refresh time, but I don't think it's what you are looking for.

    Text to paste in a bookmark:

    javascript:(function(p)%7Bopen('','',p).document.write('%3Cbody%20id=1%3E%3Cnobr%20id=2%3E%3C/nobr%3E%3Chr%3E%3Cnobr%20id=3%3E%3C/nobr%3E%3Chr%3E%3Ca%20href=%22%23%22onclick=%22return!(c=t)%22%3EForce%3C/a%3E%3Cscript%3Efunction%20i(n)%7Breturn%20d.getElementById(n)%7Dfunction%20z()%7Bc+=0.2;if(c%3E=t)%7Bc=0;e.location=u;r++%7Dx()%7Dfunction%20x()%7Bs=t-Math.floor(c);m=Math.floor(s/60);s-=m*60;i(1).style.backgroundColor=(r==0%7C%7Cc/t%3E2/3?%22fcc%22:c/t%3C1/3?%22cfc%22:%22ffc%22);i(2).innerHTML=%22Reloads:%20%22+r;i(3).innerHTML=%22Time:%20%22+m+%22:%22+(s%3C10?%220%22+s:s)%7Dc=r=0;d=document;e=opener.top;u=prompt(%22URL%22,e.location.href);t=u?prompt(%22Seconds%22,60):0;setInterval(%22z()%22,200);if(!t)%7Bwindow.close()%7D%3C/script%3E%3C/body%3E')%7D)('status=0,scrollbars=0,width=100,height=115,left=1,top=1')
     
  9. nagromme thread starter macrumors G5

    nagromme

    Joined:
    May 2, 2002
    #9
    That's pretty neat--I'll consider that too. Leaving Safari open is no problem. (I'd still need to set my Mac to wake ahead of the refresh, which could take some trial and error.) Thanks.
     

Share This Page