Scheduled tasks don't end

B

Bill

Along with creating a WinZip backup job, I scheduled
the job to run at a specified day and time. As part of
the job creation, I, of course, run the job to insure that
it zips the correct files and that the resulting zip file is
as specified.

Then, to insure that the scheduled task is also in order
with proper password authority, etc., I "Run" the task.
The MS XP Home SP2 system shows the task "running",
but it never ends. The Winzip log shows no irregularities
when run directly, so there must be something amiss
with the task scheduler. All of the Norton tasks seem to
run okay, but like I said, the Winzip jobs don't end.

Prior to using Winzip for backups, I using Stomp's
BackUpMyPC on the same offending system with the
same results, i.e., the job simply never ends.

Any ideas what might be causing all of this???

Thanks,
Bill
 
P

Pegasus \(MVP\)

Bill said:
Along with creating a WinZip backup job, I scheduled
the job to run at a specified day and time. As part of
the job creation, I, of course, run the job to insure that
it zips the correct files and that the resulting zip file is
as specified.

Then, to insure that the scheduled task is also in order
with proper password authority, etc., I "Run" the task.
The MS XP Home SP2 system shows the task "running",
but it never ends. The Winzip log shows no irregularities
when run directly, so there must be something amiss
with the task scheduler. All of the Norton tasks seem to
run okay, but like I said, the Winzip jobs don't end.

Prior to using Winzip for backups, I using Stomp's
BackUpMyPC on the same offending system with the
same results, i.e., the job simply never ends.

Any ideas what might be causing all of this???

Thanks,
Bill

You write "there must be something amiss with the
task scheduler". This is extremely unlikely. It is far
morel likely that there is something wrong with your
job, and this is what you should concentrate on.

As a first step, please post the exact command line
you're running with the Task Scheduler. Without this
line we can only guess where the problem lies.
 
P

Pegasus \(MVP\)

Fine. Now instead of invoking this command directly, invoke
the following batch file under the Task Scheduler:

Line1 @echo off
Line2 echo %date% %time% Start of task > c:\test.log
Line3 echo User=%UserName%, Path=%path% >> c:\test.log
Line4 "c:\Program Files\WINZIP\WINZIP32.EXE /autorunjobfile"
"C:\BackUpJobs-WinZip\Apps-1-Mon.wjf"
Line5 1>>c:\test.log 2>>&1
Line6 echo ErrorLevel of winzip=%ErrorLevel% >> c:\test.log
Line7 echo %date% %time% End of task >> c:\test.log

Schedule the job, then examine c:\test.log. I suspect that Winzip
starts but never ends because it is waiting for some user input.
 
B

Bill

I won't have access to the offending system until Tuesday
morning, (PST). I'll try the batch file then and post back.
Thanks,
Bill
 
P

Pegasus \(MVP\)

It's Tuesday afternoon 4pm where I live . . .

Bill said:
I won't have access to the offending system until Tuesday
morning, (PST). I'll try the batch file then and post back.
Thanks,
Bill
 
B

Bill

As you can see from the "test log", I couldn't get the
bat file to run directly.

ShortTestJob.bat: ==========================
Line1 @echo off
Line2 echo %date% %time% Start of task > c:\test.log
Line3 echo User=%UserName%, Path=%path% >> c:\test.log
Line4 "c:\Program Files\WINZIP\WINZIP32.EXE /autorunjobfile"
"C:\BackUpJobs-WinZip\ShortTestJob.wjf"
Line5 1>>c:\test.log 2>>&1
Line6 echo ErrorLevel of winzip=%ErrorLevel% >> c:\test.log
Line7 echo %date% %time% End of task >> c:\test.log
======================================

Resulting test.log: ==========================
'Line5' is not recognized as an internal or external command,
operable program or batch file.
======================================

If I run it from "scheduled", I just get a DOS prompt
from the directory c:\Windows\system32> where the
scheduled job was:

C:\WINDOWS\system32\cmd.exe "c:\ShortTestJob.bat"
(fails with or without the quotes)
 
P

Pegasus \(MVP\)

Sorry, I can see no test log. Furthermore it seems
you ran an invalid batch file. I added the line headers
"Line1" etc. to show you where each line starts. You
must, of course, remove these line headers! I attach
a copy of the batch file so that you can see what it
looks like. You may have to instruct your news reader
not to suppress the attachment.
 
B

Bill

The confusion arose in that your original post showed:
Line5 1>>c:\test.log 2>>&1
as opposed to those two parameters being a part of
line 4. I had stripped off the "Line x" notation knowing
that wasn't valid for bat files, but when the bat file failed
I put them back in thinking that perhaps there'd been
some sort of syntax change made since I last had an
occasion to use bat files.

Anyway, it's 11pm in California, USA so I'll try the
corrected bat file in the morning.

Check back tomorrow.

BTW, where are you? You're 19 hours ahead of us
here in the US. Australia is 17 hours, so I assume
you're somewhere in the orient?

Thanks,
Bill
 
B

Bill

Here's the bat file: (Running it directly)
============================================
@echo off
echo %date% %time% Start of task > c:\test.log
echo User=%UserName%, Path=%path% >> c:\test.log
"C:\PROGRA~1\WINZIP\WINZIP32.EXE /autorunjobfile"
"C:\BackUpJobs-WinZip\ShortTestJob.wjf" 1>>c:\test.log 2>>&1
echo ErrorLevel of winzip=%ErrorLevel% >> c:\test.log
echo %date% %time% End of task >> c:\test.log
============================================
Here's the test.log
============================================
11/22/2006 10:19:49.84 Start of task
User=Bill Stanton,
Path=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32\WBEM;C:\Program
Files\Symantec\pcAnywhere\;"C:\Program Files\Norton SystemWorks\Norton
Ghost\";C:\Program Files\NIVBIBLE
The directory name is invalid.
ErrorLevel of winzip=267
11/22/2006 10:19:49.85 End of task
============================================
I tried to set the path from a DOS prompt to c:\Windows, but
apparently it's not made permanent. Aside from the fact that
the default Path is outdated, I don't know why it becomes
involved in the execution of a batch file???? (Where's the path
set at boot-up time????)

Bill
 
B

Bill

No way this path is invalid!!! (I checked the environment variables
via Control Panel > System and the trailing semi-colon is absent
in the edit view of path.) I still don't understand why that path
structure is used when the reference is explicit in the bat file:
"C:\PROGRA~1\WINZIP\WINZIP32.EXE /autorunjobfile"
"C:\BackUpJobs-WinZip\ShortTestJob.wjf" 1>>c:\test.log 2>>&1
===========================================
11/22/2006 11:53:08.98 Start of task
User=Bill Stanton,
Path=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32\WBEM;
The directory name is invalid.
ErrorLevel of winzip=267
11/22/2006 11:53:09.00 End of task
===========================================
 
B

Bill

C:\PROGRA~1\WINZIP\WINZIP32.EXE /autorunjobfile
Should not have been a quoted string.
=======log================================
11/22/2006 12:11:50.81 Start of task
User=Bill Stanton,
Path=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32\WBEM;
ErrorLevel of winzip=0
11/22/2006 12:11:58.09 End of task
=========================================
I'll now take the bat file to the clients for testing.

Bill
 
P

Pegasus \(MVP\)

I see you're making progress. Do you still think there is
something amiss with the Task Scheduler? Have you
found out why it did not end in your original configuration?
 
B

Bill

I'm going to my clients in about 20 minutes and will
post back after I attempt to run your "try.bat".
Bill
 
B

Bill

FINALLY!!!!!!!

The client machine has 3 user accounts. One is "Admin",
that includes a password, and two individual accounts
that DO NOT have passwords.

All of the "Scheduled Tasks" are run under the authority
of "Admin", as of course we all know is a requirement
imposed by Windows.

The Winzip backup jobs were created by one of the two
users where the "Admin"/password was entered as part
of Winzip's scheduling. Then, subsequent to the job
creations that user attempted to RUN the scheduled
task wherein the "Scheduled tasks don't end" post was
made when the task never ended.

Winzip has, as one of its configuration settings, an option
wherein there is a user security warning and verification
prompt whenever a Winzip "job" is to be run. HOWEVER,
that prompt ISN'T displayed UNLESS the authorizing user
is running the job, "Admin" in this case; i.e., one has to log
onto Windows as "Admin" and run the scheduled task in
order to SEE the prompt.

The solution, in this particular case, was to simply "un-check"
the security setting in Winzip's security warning option settings.
Or, run the task for the 1st time under the authorizing ID and
check the box in the security prompt indicating no further
security checks need be made on THAT particular job.

(This was a most valuable lesson to have learned, as I have
6 more independent machines to configure. And yes, it had
nothing to do with the Scheduled Task manager having run
amiss.)

Thanks,
Bill
Graeagle, CA USA

(PS) You never did answer the question regarding on what
continent you're on that's 19 hours ahead of us here in California.
 
P

Pegasus \(MVP\)

See below.

Bill said:
FINALLY!!!!!!!
Congratulations!

The client machine has 3 user accounts. One is "Admin",
that includes a password, and two individual accounts
that DO NOT have passwords.

All of the "Scheduled Tasks" are run under the authority
of "Admin", as of course we all know is a requirement
imposed by Windows.

This is incorrect. You can schedule tasks under any account,
as long as it has a password.
The Winzip backup jobs were created by one of the two
users where the "Admin"/password was entered as part
of Winzip's scheduling. Then, subsequent to the job
creations that user attempted to RUN the scheduled
task wherein the "Scheduled tasks don't end" post was
made when the task never ended.

Winzip has, as one of its configuration settings, an option
wherein there is a user security warning and verification
prompt whenever a Winzip "job" is to be run. HOWEVER,
that prompt ISN'T displayed UNLESS the authorizing user
is running the job, "Admin" in this case; i.e., one has to log
onto Windows as "Admin" and run the scheduled task in
order to SEE the prompt.

The solution, in this particular case, was to simply "un-check"
the security setting in Winzip's security warning option settings.
Or, run the task for the 1st time under the authorizing ID and
check the box in the security prompt indicating no further
security checks need be made on THAT particular job.

(This was a most valuable lesson to have learned, as I have
6 more independent machines to configure. And yes, it had
nothing to do with the Scheduled Task manager having run
amiss.)

The most important lesson is perhaps that if something does
not work then it is very rarely due to a bug in Windows.
Windows is so widely used that most (but not all!) bugs get
eliminated by the time SP1 is out.

You're welcome. Glad you solved it.
Bill
Graeagle, CA USA

(PS) You never did answer the question regarding on what
continent you're on that's 19 hours ahead of us here in California.

Melbourne, Australia. We now have Daylight Saving Time.
 
B

Bill

I never suspected bugs in the STC manager, rather, I thought
perhaps there was some obscure setting that required closer
attention. I too suspected a hidden user prompt, but had no clue
as to how to un-cover it.

Thanks again,

Bill
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Batch job question 8
Scheduled tasks and hibernation 4
scheduled tasks not starting 2
Scheduled Tasks problem 5
scheduled tasks 9
Scheduled tasks in WP 9
Scheduled Tasks 6
Task Scheduler Stopped Working 21

Top