Re: Scheduled tasks don't end



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

"Pegasus (MVP)" <I.can@xxxxxxx> wrote in message
news:Op9AysbDHHA.4728@xxxxxxxxxxxxxxxxxxxxxxx
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.


"Bill" <stanton@xxxxxxx> wrote in message
news:n4I8h.1778$tM1.1578@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
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)





"Pegasus (MVP)" <I.can@xxxxxxx> wrote in message
news:OiRdfUSDHHA.3212@xxxxxxxxxxxxxxxxxxxxxxx
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.


"Bill" <stanton@xxxxxxx> wrote in message
news:fKu8h.1585$ql2.1406@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
C:\PROGRA~1\WINZIP\WINZIP32.EXE /autorunjobfile
"C:\BackUpJobs-WinZip\Apps-1-Mon.wjf"


"Pegasus (MVP)" <I.can@xxxxxxx> wrote in message
news:u6DVoyRDHHA.4464@xxxxxxxxxxxxxxxxxxxxxxx

"Bill" <stanton@xxxxxxx> wrote in message
news:tBt8h.1385$sf5.862@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
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.













.



Relevant Pages

  • Re: Use task scheduler to start up an MDB form?
    ... path name of the MDB. ... double clicking on the batch file starts things up just ... so i tried having each task scheduler call access directly, ... >> double clicking on a .bat file that uses this, ...
    (microsoft.public.access.forms)
  • Re: Scheduled tasks dont end
    ... I won't have access to the offending system until Tuesday ... I'll try the batch file then and post back. ... the following batch file under the Task Scheduler: ... I suspect that Winzip ...
    (microsoft.public.windowsxp.general)
  • Re: Scheduled tasks dont end
    ... you ran an invalid batch file. ... "Line1" etc. to show you where each line starts. ... the following batch file under the Task Scheduler: ... I suspect that Winzip ...
    (microsoft.public.windowsxp.general)
  • Re: pb with a Scheduled Task
    ... What does your batch file look like? ... What does the Task Scheduler log file report? ... i installed a new server in my domain with 2008 STD edition in replacement of a 2003R2 to host a database ... on the old server i was running a Scheduled Task every night who lauch a bat file ...
    (microsoft.public.windows.server.general)
  • Re: Task Scheduler job Hangs (rundll32 printui.dll,PrintUIEntry)
    ... I modified my batch file to include your recommendation. ... The bat file ... related to a batch job hanging when initiated via Task Scheduler. ... I take the same batch job and initiate it with the ...
    (microsoft.public.windows.server.general)