Re: Schedular just won't work
- From: "Pegasus \(MVP\)" <I.can@xxxxxxxxxx>
- Date: Thu, 5 Jun 2008 21:04:47 +0200
"livetohike" <moormansd@xxxxxxxxx> wrote in message
news:26858e89-7ef7-43c2-bfeb-a325a96d0a74@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Jun 3, 3:24 pm, "Pegasus \(MVP\)" <I....@xxxxxxxxxx> wrote:
"livetohike" <moorma...@xxxxxxxxx> wrote in message
news:17b8183a-419e-4146-ad00-90b312fa4880@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Thanks.
In the interest of clarity I had edited the batch I posted. Below is
the one I have been using and it runs w/ the anomaly described above.
Summary: Runs correctly from Explorer, but does not run from
scheduler.
Just in case I search the entire drive for the file w/ no luck.
echo %date% %time% %UserName% >> "C:\Documents and Settings
\Administrator\My Documents\Computers\Batch & Shortcuts
\ScheduleTest.txt"
I suggest you start nice and simple like so, then expand the
batch file one item at a time:
@echo off
echo %date% %time% %UserName% >> C:\Test.txt
echo Pausing for 30 seconds . . .
ping localhost -n 30 > nul
You must check the Task Scheduler's log file to see if
the task ran. And please don't wait another ten days with
your reply - this thread will have fallen off the edge of my
newsreader by then!
Great idea! Interesting results.
It worked as you wrote it. I then moved the bat into each of the
following folders and retested:
OK - C:\Documents and Settings\
OK - C:\Documents and Settings\Administrator\
OK - C:\Documents and Settings\Administrator\My Documents
OK - C:\Documents and Settings\Administrator\My Documents\Computers\
NO - C:\Documents and Settings\Administrator\My Documents\Computers
\Batch & Shortcuts\
I finally realized scheduler does not like the ampersand even though
the path is quoted... strange?
Easy enough to rename the folder, but I would like to now why '&' is
not supported by the schedular.
I tried 'escaping' it via && w/ no luck.
Thanks
Try escaping it like so: \Batch ^& Shortcuts\
About trouble-shooting: I don't claim any credit for having suggested
this approach. When attempting to solve a seemingly unsolveable
problem then it's standard practice
a) To break the problem into smaller and smaller pieces until
the cause becomes obvious, and
b) To simplify things as much as possible in order not to trip
over some issue that is hard to spot in complex code.
In the initial post in this thread you applied option b) (which
was a good thing) but you did it so savagely that it became
impossible for respondents to see the cause of the problem . . .
.
- References:
- Re: Schedular just won't work
- From: livetohike
- Re: Schedular just won't work
- From: Pegasus \(MVP\)
- Re: Schedular just won't work
- From: livetohike
- Re: Schedular just won't work
- Prev by Date: Re: Internet Explorer 7
- Next by Date: Re: Internet Explorer 7
- Previous by thread: Re: Schedular just won't work
- Next by thread: Re: Windows XP activation code
- Index(es):
Relevant Pages
|