1

I always forget to clock in on our web-based timeclock in the morning. In the past I've used a geofence reminder on my phone to remind me when I get to the office, but sometimes I start my day elsewhere and clock in there.

The first thing I do in the morning is check my email and admin dashboard, and those are my Chrome homepages. I thought it would be helpful if my homepage was the timeclock page, but I don't want it to always be my homepage. Only between the hours of 8:30 - 10 AM.

How would I go about setting my homepage to be a certain page between certain hours of the day? I'm using ubuntu, but doing it in Windows would be just as helpful.

7
  • Instead of setting the homepage, couldn't you just set a scheduled job to open the website at a certain time?
    – Rynant
    May 1, 2014 at 13:44
  • I assume using a calendar reminder isn't a solution? You do it a couple dozen times and you likely wouldn't need it in the future.
    – Ramhound
    May 1, 2014 at 13:50
  • I would do it based on calendar reminder, but I don't always end up at the office at the same time every day. And I'm very forgetful :)
    – user201262
    May 1, 2014 at 13:55
  • A calendar appointment from 8-10 would be pretty persistent. What do you expect to accomplish with a homepage based on time if you're not always going to "end up in the office at the same time"? I don't understand how this is different than using a calendar. May 1, 2014 at 14:07
  • 1
    On a different note, I think this might be a good question on strategy over at productivity.stackexchange.com rather than finding a technical solution. May 1, 2014 at 14:08

1 Answer 1

3

... why don't you try to create a local homepage on your hard disk, with an automatic redirection that depends from the time? Here below an example that open new tabs (or windows). It's just an idea (and my 1st attempt with javascript) but it seems it function...

<html>
<body>
<p id="demo2">Smile</p>

<script type="text/javascript">
  function RedirectHompage() 
  {
    var time=new Date().getHours();
    if ( (time>8) && (time<10)){
      // Change the link below with the ones you prefer    
      setTimeout( function() { window.open( 'https://www.google.com','_blank');}, 500);
      setTimeout( function() { window.open( 'http://www.excite.com','_blank');}, 1000);
      }
   else {
      // Normal time of the day: work!   
      setTimeout(function() { window.open( 'http://www.yahoo.com','_blank');}, 1000);
      }
  }
  window.onload = RedirectHompage;
</script>
</body>
</html>

To redirect automatically it is possible to use:

window.location.href = "http://www.altavista.com";

2
  • How do you program Chrome to load those local page?
    – code-8
    Oct 19, 2023 at 20:50
  • The idea, almost 10 years old, was to write that script in a local page and then set that page as your home page... So every time you open Chrome on your home page the code inside will be executed. I check with Chromium and it still works...
    – Hastur
    Oct 20, 2023 at 14:06

You must log in to answer this question.