Re: Time Services

This topic contains 19 replies, has 2 voices, and was last updated by Avatar of BillDen BillDen 3 years, 2 months ago.

Viewing 10 posts - 11 through 20 (of 20 total)
Author Posts
Author Posts
January 19, 2011 at 7:47 pm #89847
Avatar of W7NOmoronovo
W7NOmoronovo
Member

Yes, this is by design for the time service (along with a few others, like print spooler) – and I’ll take a minute to explain why this is the case.

Basically, with Windows 7 Microsoft realized that in a standard environment – not in a domain controlled by Active Directory, nor configured with a startup script to specifically call on it to start automatically – that the time service is rarely used. Often, it is only called to start when the time is set to be scheduled to synchronize – and then it is started on-demand by Task Scheduler.

This means that, unless your system is controlled by Group Policy via a domain (active directory), the service will not start if it’s set to "Automatic", it’s skipped over in the startup process as it is considered an extremely low priority service.

As you suggested, one way to get around this is to set it to startup as "Automatic (Delayed)". This means the service will not be started until all other services are started first, therefore prioritizing the important services first (delayed ones generally start about 60 seconds after all other services are done loading) and sidestepping Windows attempting to optimize the boot process.

You could also fix this by setting the time service to start through Task scheduler when the system starts – however, it’s surprisingly complex to set up. I’d be happy to explain it if you want, though.

January 19, 2011 at 8:03 pm #89848
Avatar of BillDen
BillDen
Member

Once again you come through with the goods! 

The 60 second delay is not that big a deal EXCEPT this "system" I am building is going to be deployed to a classroom environment where the Instructor will probably not be familiar with all the ins and outs of getting this thing up and running and might get "anxious" if the phones do not grab the time immediately.

I’d prefer to have the service started at bootup if possible.  You mentioned it was "surprisingly complex", but I’d like to give it a shot if you have the time to explain it to me.

Thanks again!

January 19, 2011 at 8:07 pm #89849
Avatar of W7NOmoronovo
W7NOmoronovo
Member

I guess I should’ve been more concise when I said that – more accurately, it’s surprisingly complex to perform such a simple task.

I could explain the process here for you if you like, but if preferable I do also occasionally help forum users by using screen sharing software called Teamviewer (It works in much the same way as Remote Assistance). If that would be preferable, let me know, since it’ll take me a little time to actually type out the process accurately.

January 19, 2011 at 8:41 pm #89850
Avatar of W7NOmoronovo
W7NOmoronovo
Member

Okay, the process to get this service started automatically is simple, but convoluted. Just follow these instructions.

  • Open up Task Scheduler. Easiest way to find it is simply by typing Task Scheduler into the windows start menu, but its normal entry is located in programs > accessories > system tools > task scheduler.
  • Make sure it’s listed at the left as "Task Scheduler (Local)", then navigate to task scheduler library > Microsoft > windows > time synchronization. It doesn’t actually matter where you put the entry, but it’s worthwhile grouping similar entries together.
  • Now, there should be one entry already there – right click the space below it and select "create new task". Don’t select basic, as it won’t allow you to set command line options (which are needed to start services).
  • Now, with the Create Task dialog box open at the General tab , you need to change the following things:[list:25lkc3a8]
    [*:25lkc3a8]Name the entry (I name it W32time start).[/*:m:25lkc3a8]
    [*:25lkc3a8]Add a description (pretty self explanatory).[/*:m:25lkc3a8]
    [*:25lkc3a8]Select the "change user or group" button. then, select "Advanced…" and then click "Find Now" at the middle-right in order for it to bring up all built in users and groups. Scroll down at the bottom until you find Local Service and double click it. Then, click OK.[/*:m:25lkc3a8][/list:u:25lkc3a8][/li]
  • Next, navigate to the "Triggers" tab and select "New…". At the drop down box at the top, select "at startup". Make sure the "Enabled" box is ticked, then select OK.
  • Navigate to the Actions tab, and select "new…". Make sure the dropdown at the top is set to "Start a program", then type [i:25lkc3a8]%systemroot%system32net.exe[/i:25lkc3a8] in the "program/script" box. In the "arguments" box, type [i:25lkc3a8]start w32time[/i:25lkc3a8]. You can ignore the Start In box.
  • Navigate to the Conditions tab. I recommend unticking all of these to prevent the service from not being started (for example, a laptop running on battery would halt the startup).
  • Finally, go to the Settings tab. Make sure the settings "allow this task to be run on demand" and "run this task as soon as possible after a scheduled start is missed" are checked. Uncheck "stop this task if it runs longer than:", and set the dropdown menu at the bottom to be either: "Do not start a new instance" or "stop the existing instance".

Well, that took ages to type and verify, so I hope you can work through it. After this, ensure that the service is set to Manual in Services, as automatic or automatic (delayed) could potentially cause delays in startup when a scheduled task is due to do the same thing.

January 19, 2011 at 9:24 pm #89851
Avatar of BillDen
BillDen
Member

Ok here’s the deal.  It didn’t work. 

First of all, I am typing to you on a military network so I am unable to work with you via Teamviewer.  Sorry, I know that would have been the best route to go.  Also, the Windows 7 box I am trying to configure is on a closed network, so Teamviewer is probably not an option anyway.

As far as the directions go, they were very specific and thorough…thanks.

I configured it exactly as you wrote and it didn’t work.  Then I remembered that when I was starting and stopping the w32time service from the command line, I had to use "run as administrator".  So I thought I would modify the task scheduler a little and check the "Run with highest privileges" box and just for the heck of it, I changed the drop-down box at the bottom of the "General" tab to "configure for Windows 7" because it was set to "configure for Windows Vista".

I rebooted again and the service is still not starting.  I looked in the history of the task scheduler and it didn’t show that it had been run.

Any thoughts?

January 19, 2011 at 9:33 pm #89852
Avatar of W7NOmoronovo
W7NOmoronovo
Member

You only need to run it as an administrator when doing it from the command line because your own account does not have the privileges to start a service – that’s why you need to make sure the Local Service account is the one starting it from Task Scheduler, and why additional privileges are not ( or should not be, at least) required.

If you’ve made sure to check every part of the instructions again to ensure no steps have been missed, then I’m not sure I’ll be able to help more specifically – I would need to have a look to see where the problem is, but as you’ve suggested that won’t be possible.

I tested these steps myself on my laptop initially, and just went through the procedure as I had written it on my desktop to make sure they do actually work, and it seemed to function here both times, so I’m not sure where the problem lies. I’ll take some screenshots in a moment so you can compare how task scheduler should look, just in case.

January 19, 2011 at 9:40 pm #89853
Avatar of BillDen
BillDen
Member

Thanks,

I’ll rerun your instructions to make sure I didn’t miss a step.

I will be leaving in a few minutes.  I’ll keep trying your solution and let you know if anything changes.

Thanks for all your help so far.

January 19, 2011 at 9:56 pm #89854
Avatar of W7NOmoronovo
W7NOmoronovo
Member

I have uploaded 5 images here to show what the task should look like. They should be in order, but each image is basically showing each tab – these are the settings that function on both my desktop (windows 7 enterprise 64bit) and laptop (windows 7 ultimateN 32bit).

<!– m –><a class="postlink" href="http://img254.imageshack.us/g/21513587.png/">http://img254.imageshack.us/g/21513587.png/</a>&lt;!– m –>

January 20, 2011 at 1:30 pm #89855
Avatar of BillDen
BillDen
Member

I am unable to download the images because the base’s web filter is blocking them.&nbsp; Is there any possibility you could send them to my email address?

Sorry for all the bother.

January 20, 2011 at 8:42 pm #89857
Avatar of BillDen
BillDen
Member

Omoronovo,
I can’t explain it.&nbsp; I had a friend email me the screen shots you posted and I started all over again.&nbsp; I am configured EXACTLY as you are but when I restart the computer, the w32Time service is not started.

Is it possible that some other registry setting other than the ones you mentioned earlier could be causing the problem?

Anyway, my workaround it to leave it set to automatic (delayed) and just wait for it to start.

Again thanks for all the time you spent with&nbsp; me and if you have any new ideas, I’d love to hear them.&nbsp; Also, if I figure something else out, I’ll be sure to post it.

Thanks!

Viewing 10 posts - 11 through 20 (of 20 total)

You must be logged in to reply to this topic.