Task scheduler

  • Thread starter Thread starter Eric
  • Start date Start date
E

Eric

Hello,

I have a task scheduled to run a on a Win2k Pro machine. It is setup to run
at 3:15AM and for some reason it is executed twice. Once at 2:15 AM and then
at 3:15AM.
Could this have anything to do with the Daylight Saving Time?
Any ideas?

Thank you.

Eric
 
Eric said:
Hello,

I have a task scheduled to run a on a Win2k Pro machine. It is setup to
run at 3:15AM and for some reason it is executed twice. Once at 2:15 AM
and then at 3:15AM.
Could this have anything to do with the Daylight Saving Time?
Any ideas?

Thank you.

Eric

- How do you know it executes twice?
- Does the Task Scheduler log file say so?
- Does it do so every night?
- Did you tick the "repeat task" box?
- Do you have multiple schedules?
 
- How do you know it executes twice?
The task runs a backup then sends an email. I get 2 backups and 2 emails.
- Does the Task Scheduler log file say so? Yes

- Does it do so every night? Yes

- Did you tick the "repeat task" box? No

- Do you have multiple schedules?
No
 
I would create a test task and see if the same happens
to it. If it does not then I would delete/recreate the
problem task.
 
That was my next step...

Thank you.

Eric


Pegasus (MVP) said:
I would create a test task and see if the same happens
to it. If it does not then I would delete/recreate the
problem task.
 
Hello,

I have a task scheduled to run a on a Win2k Pro machine. It is setup to run
at 3:15AM and for some reason it is executed twice. Once at 2:15 AM and then
at 3:15AM.
Could this have anything to do with the Daylight Saving Time?
Any ideas?

Thank you.

Eric


Kinda strange. I have a full anti-virus scan scheduled for 1 AM, then
a backup scheduled at 3 AM for every Thursday morning. You should
check the log file.
 
I re-created the task and it is still happening...

There is in fact 2 tasks. One (VFPlogin) that creates a specific file for
the second task to check, reboots the PC and login to the network
automatically.
The other task (VFPaction) is launched upon login, if the specific file is
present, it runs a backup, send an email and then deletes the specific file.

I have included the log. What is interesting is that VFPlogin starts a
3:15:01, as scheduled, the machine reboots but somehow the time is changed
by the time VFPaction starts (2:17:24) which means that an hour it will be
again 3:15 and the 2 tasks will run again.

It doesn't make any sense!! Why is the time changed and why is it not
happening indefinitely anyway?

Thank you.

Eric


4.71.2195.6972"VFPlogin.job" (VFPlogin.exe)
Started 4/19/2008 3:15:01 AM
"VFPlogin.job" (VFPlogin.exe)
Finished 4/19/2008 3:15:01 AM
Result: The task completed with an exit code of (0).
"Task Scheduler Service"
Exited at 4/19/2008 3:15:04 AM
"Task Scheduler Service"
Started at 4/19/2008 3:16:46 AM
"Task Scheduler Service"

4.71.2195.6972"VFPaction.job" (VFPaction.exe)
Started 4/19/2008 2:17:24 AM
"VFPaction.job" (VFPaction.exe)
Finished 4/19/2008 2:22:36 AM
Result: The task completed with an exit code of (0).
"Task Scheduler Service"
Exited at 4/19/2008 2:22:44 AM
"Task Scheduler Service"
Started at 4/19/2008 2:24:10 AM
"Task Scheduler Service"

4.71.2195.6972"VFPlogin.job" (VFPlogin.exe)
Started 4/19/2008 3:15:01 AM
"VFPlogin.job" (VFPlogin.exe)
Finished 4/19/2008 3:15:01 AM
Result: The task completed with an exit code of (0).
"Task Scheduler Service"
Exited at 4/19/2008 3:15:05 AM
"Task Scheduler Service"
Started at 4/19/2008 3:16:46 AM
"Task Scheduler Service"

4.71.2195.6972"VFPaction.job" (VFPaction.exe)
Started 4/19/2008 3:17:23 AM
"VFPaction.job" (VFPaction.exe)
Finished 4/19/2008 3:22:54 AM
Result: The task completed with an exit code of (0).
"Task Scheduler Service"
Exited at 4/19/2008 3:23:01 AM
"Task Scheduler Service"
Started at 4/19/2008 3:24:24 AM
"Task Scheduler Service"
 
Eric said:
I re-created the task and it is still happening...

There is in fact 2 tasks. One (VFPlogin) that creates a specific file for
the second task to check, reboots the PC and login to the network
automatically.
The other task (VFPaction) is launched upon login, if the specific file is
present, it runs a backup, send an email and then deletes the specific
file.

I have included the log. What is interesting is that VFPlogin starts a
3:15:01, as scheduled, the machine reboots but somehow the time is changed
by the time VFPaction starts (2:17:24) which means that an hour it will be
again 3:15 and the 2 tasks will run again.

It doesn't make any sense!! Why is the time changed and why is it not
happening indefinitely anyway?

Thank you.

Eric

I assume you intended to reply to me, not to Phisherman.

From your observation I gather that this is no longer a problem
with the Task Scheduler. It is a problem with your system clock.
I get the impression that one of your VFP tasks (or perhaps some
other agent) changes the system time.

Create a new scheduled task and get it to invoke shutdown.exe
so that the machine reboots. Now check two things:
- Does the system time change when you reboot the machine
manually?
- Does the system time change when you reboot the machine
with the scheduled task that invokes shutdown.exe?

You can download many versions of shutdown.exe, e.g.
the own from www.sysinternals.com.
 
Pegasus,

My tasks don't change the time if they did, they would run indefinitely (and
it would serve no purpose)...
That machine is used during the day and the time doesn't change when it is
rebooted.
The problem lies within Win2k or the task scheduler.
My tasks have been running fine for quite some time (almost 2 years) until I
decided to modify the time from 2:00 to 3:15 because 2:00 was a bad choice
for DST switch.
My 2 tasks also already call shutdown.exe.

Eric
 
Pegasus,

I did what you suggested, I setup a "shutdown" task to run at 4:20PM.
Result: when the Task Scheduler starts again, it is 5:21:PM, interesting !!

Here's the log:

"shutdown.job" (shutdown.exe)
Started 4/19/2008 4:20:00 PM
"shutdown.job" (shutdown.exe)
Finished 4/19/2008 4:20:00 PM
Result: The task completed with an exit code of (0).
"Task Scheduler Service"
Exited at 4/19/2008 4:20:02 PM

"Task Scheduler Service"
Started at 4/19/2008 5:21:26 PM


Eric
 
same exact thing with manual reboot:

"Task Scheduler Service"
Exited at 4/19/2008 5:16:37 PM

"Task Scheduler Service"
Started at 4/19/2008 6:18:00 PM
 
I think you have an unhealthy fascination with the Task
Scheduler service. (Grin, just joking). What about the
really important things in life such as system time, or
the System log in the Event viewer?
 
The event viewer shows the same discrepencie...but I think I've got now 1/2
the answer.
The PC has the wrong time but is setup to sync with the network time when
you log in, which is when it picks up the right time.

Now the question is, why isn't the time sticking?

We are getting closer...
 
I'm glad you overcame your morbid fascination with the
Task Scheduler service. You should now concentrate on
your startup tasks. If you're in a domain environment then
your time may be set by some domain policy or by the netlogon
script. If this is a stand-alone machine then the time could be
set by some startup command or even by the Windows Time
service. You need to examine all of those in detail. Running
msconfig.exe (http://www.svrops.com/svrops/dwnldoth.htm)
could help you with this. A reboot into Safe Mode would also
give you some useful hints. And don't forget to check your
system clock and time zone settings!
 
Pegasus,

The server I am logging to is a NetWare server and the PC is setup to sync
with the server. The Novell Client allows me to "log only" to the PC if I
want, this is how I found out about the discrepancies. I guess Win2k goes
back to its own internal time as soon as you restart the PC (until you log
in again to the server).

A general question about DST switch, if I may: How does the switch occur?
I understand that it happens at 2:00AM, but, is it enough for the PC to be
running? Or does a login have to take place for the new time to take effect?

Thank you.

Eric
 
Eric said:
Pegasus,

The server I am logging to is a NetWare server and the PC is setup to sync
with the server. The Novell Client allows me to "log only" to the PC if I
want, this is how I found out about the discrepancies. I guess Win2k goes
back to its own internal time as soon as you restart the PC (until you log
in again to the server).

A general question about DST switch, if I may: How does the switch occur?
I understand that it happens at 2:00AM, but, is it enough for the PC to be
running? Or does a login have to take place for the new time to take
effect?

Thank you.

Eric

The time change takes place on the fly. I have often observed this
on servers that had a heartbeat monitor installed: It recorded the
change even while nobody was logged on.
 
Pegasus,

Thank you for helping out with my task scheduler problem.
BTW, my tasks ran only once this morning.

Eric
 
Eric said:
Pegasus,

Thank you for helping out with my task scheduler problem.
BTW, my tasks ran only once this morning.

Eric

Thanks for the feedback. Did you identify the agent that
kept changing your system clock?
 
No agent ever changed the time. The PC had just a different time than the
network had. Every time the PC was restarted, it was going back to its own
time and as soon as the task logged into the network, the PC was picking up
the network time. I just changed the PC time to match the one set on the
network.
What I didn't know was the fact that the sync of network time with the PC
was not permanent, that's why it took a while to find.

Live and learn...

Eric
 
Back
Top