Re: Scheduled tasks copied between servers often do not run



Thank you.
I will check the Event viewer, it must be worth a visit for sure.
I can try to reproduce the behaviour with just a stub cmd file like you've
enclosed,
going through the copy process I described before to try to reproduce the
behaviour.
The utility I mentioned is JT.EXE
We are implementing dynamic Job monitoring across all the servers using
Rendezvous messaging
and our own utility which will allow remote task management - that may solve
the problem
because it will allow us to copy tasks from one server and create a
duplicate on another
without going throught the RDP,copy,paste,RDP,copy,paste process

I assume the scheduler just scans the Windows\Tasks folder and requires no
registry entries for tasks. Is that so?
And if so it is very hard to see why jobs are getting skipped....

Thanks

"Pegasus (MVP)" <I.can@xxxxxxx> wrote in message
news:%23g4RPFAxGHA.2432@xxxxxxxxxxxxxxxxxxxxxxx
In such cases it's a good idea to go back to basics. Schedule
the batch file below, check its output and the Task Scheduler's
log file, then modify it to run the tasks that YOU want to run.
This will soon tell you why it fails. If you still have problems
then you should post the contents of the Task Scheduler's log
file. You should also examine the Event Viewer for relevant
entries.

@echo off
echo %date% %time% Start of task > c:\test.log
echo User=%UserName%, Path=%path% >> c:\test.log
cacls %systemroot%\system32 1>>c:\test.log 2>>&1
echo ErrorLevel of cacls.exe=%ErrorLevel% >> c:\test.log
echo %date% %time% End of task >> c:\test.log

"Laogui32" <Laogui32@xxxxxxxxxxx> wrote in message
news:O6MsR4$wGHA.4680@xxxxxxxxxxxxxxxxxxxxxxx
When I said there was no log entry, I mean that literally, nothing
appears
in the log for the task until it is run manually.
It is not a claim, and it is not guesswork.
The tasks just do not run and there is no record.
We take a daily copy of the scheduler's task log to avoid the 32k
wrap-around.
Each of the tasks records its own log if started. They were never
started.

Once they have been run manually the first time, they schedule normally
thereafter.
Approximately 70% of the tasks so far copied in the manner described do
not
start on the first day,
on the next day etc until run once. Detailed inspection of the task
properties using the little
Microsoft Tasks utility (cannot remember its name) shows nothing out of
the
ordinary.
The properties on the target machine replicate those on the source
machine.

This problem has applied to tasks copied from 4 different servers with
different images, to 4 different servers
two of them with different images, so it is not an isolated problem but
generic in our installations.

Thank you for your reply.

"Pegasus (MVP)" <I.can@xxxxxxx> wrote in message
news:uSPnft$wGHA.324@xxxxxxxxxxxxxxxxxxxxxxx
See below.

"Greg" <Greg@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:14AC4AF4-F1B8-4AD2-B3AD-D30C94FD724A@xxxxxxxxxxxxxxxx
(Sorry, misposted in 'Accessibility')
After copying tasks between servers and applying passwords, the copied
task
often does not run on the target machine.
*** How can you tell?

It seems the scheduler simply does not see the task until it has been
manually run once.
*** This is incorrect.

There is no status message and no entry in the log to indicate any
cause,
and the last run/next run times never change.
*** Which log?

We are migrating nearly 200 tasks from old servers to new servers, and
cannot just run these tasks at anytime to force them to run
automatically
thereafter. The scheduled tasks run-times are distributed over 24
hours

The method used to copy the tasks is:
1. RDP to the old server and copy the tasks to a network folder using
drag
and drop in Windows Explorer
*** That's fine.

2. RDP to the new server, drag and drop tasks into C:\Windows\Tasks.
(Occassionally Windows Explorer crashes when pasting, but tasks
still
arrive
*** This is of concern.

3. Apply passwords.
4. Wait and hope!
*** You can do much better - see below.

Can anyone propose a solution or point to a problem ticket somewhere?

XP 2003 Pro, SP2


So far you claim that some tasks do not run appears to be
largely based on guesswork. To be sure you MUST inspect
the Task Scheduler's log file. You should also embed your
scheduled task into the batch file below, then examine its
log file. I suspect that it will reveal a lot!

@echo off
echo %date% %time% Start of task > c:\test.log
echo User=%UserName%, Path=%path% >> c:\test.log
c:\Tools\YourTask.exe 1>>c:\test.log 2>>&1
echo ErrorLevel of c:\Tools\YourTask.exe=%ErrorLevel% >> c:\test.log
echo %date% %time% End of task >> c:\test.log








.



Relevant Pages

  • Re: Scheduled tasks copied between servers often do not run
    ... the Task Scheduler relies totally on %SystemRoot%\tasks. ... AFAIK no registry entries are involved. ... We are implementing dynamic Job monitoring across all the servers using ... echo %date% %time% Start of task> c:\test.log ...
    (microsoft.public.windowsxp.general)
  • Re: problems with enbeded for loop
    ... intermediate file to generate the list of servers -- which you don't need ... echo errorlevel is %errorlevel% ... The script fails at this command '%bin%\netsvc DHCPSERVER \\%server% /query'. ...
    (microsoft.public.win2000.cmdprompt.admin)
  • Re: Event Viewer Configuration Question??
    ... 2000/2003) where management wants to find how Event Viewer is ... Eases the ability to keep tabs on 30+ servers. ... But as for configuring the ... Instead of the website you're using, I suggest to use OEx (Outlook Express ...
    (microsoft.public.windows.server.active_directory)
  • Re: Scheduled tasks copied between servers often do not run
    ... different images, to 4 different servers ... The scheduled tasks run-times are distributed over 24 hours ... the Task Scheduler's log file. ... echo %date% %time% Start of task> c:\test.log ...
    (microsoft.public.windowsxp.general)
  • Re: NTFS and MFT corruption
    ... I have not viewed Event Viewer and will do so. ... Can you swap the card for a equivalent card it another ... >>> since the nightly backup is showing these errors. ... >>> This is the most important drive I have out of the 33 servers I run on ...
    (microsoft.public.win2000.file_system)