Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista General Discussion > Re: ERROR CODE ON SCHEDULED TASK

Reply
Thread Tools Display Modes

Re: ERROR CODE ON SCHEDULED TASK

 
 
VanguardLH
Guest
Posts: n/a

 
      08-09-2009
HankL wrote:

> I am receiving the following error code under column LAST RUN RESULT (0X1)
>
> When I use an Attribute that has a single word, i.e. Paperport, I set it up as space -RPaperport and it works just fine. The final result is (0x0) successful
> When I use an Attribute that has two single words with a space between them, I set it up as "space-Special Sites" and the final result is (0x1) and is not successful


Is "attribute" what the rest of us call command-line parameters? Rather
than describe just a tiny portion of the entire event defined in Task
Scheduler, show more details, like the *complete* command that you pass
in the event (i.e., what it runs) for when the event runs okay and when
it fails. I'm guessing that you aren't properly employing double quotes
to delimit the command or you are including them around the parameters
(which means you are passing one parameter, not two, and that the
program aborts because it is then an undefined parameter).

After defining the event for when it generates the failure code, what
happens if you copy the *entire* command line for the event and run it
in a command prompt? If the program's executable isn't available via
the currently defined PATH environment variable, you will need to 'cd'
to the directory where the executable is located. The same is true in
the event's definition: if the executable isn't in the PATH, you need to
either specify the full path to the executable or specify the executable
file's path in the start-in field for the event.

Did you look at Task Scheduler's log (advanced menu)? It rolls over so
you have to find where is the "[ ***** Most recent entry is above this
line ***** ]" delimiter line showing the rollover point and look at the
events above that line.
 
Reply With Quote
 
 
 
 
VanguardLH
Guest
Posts: n/a

 
      08-09-2009
Hankl, STOP POSTING IN HTML! When posting in newsgroups, always use
plain text. Configure Windows Mail to use text when posting to
newsgroups.

HankL wrote:

> In answer to your questions,
>
> 1) Is "attribute" what the rest of us call command-line parameters?
> Answer: 'Arguments'
>
> 2) *complete* command that you pass in the event
> This is a typical line and format that received the error message
> (0x1)
> Answer: "C:\Program Files (x86)\SyncToy2.0\SynctoyCmd.exe"
> -R"Garage My Pictures"
>
> 3) Event that ran OK
> Answer: "C:\Program Files (x86)\SyncToy2.0\SyncToyCmd.exe" -Quicken


So the problem is SyncToy fails when you attempt to specify the folder
pair that you want it to synchronize. Did you ever define that folder
pairing (named "Garage My Pictures") in SyncToy? Does SyncToy complete
the synchronization okay when you run SyncToy and do the update using
its UI?

I only meant to address how to solve problems in Task Scheduler. It has
been several years since I toyed with SyncToy. If you need help with
that program then start a new thread about SyncToy and using
command-line parameters (arguments) for it. From playing with SyncToy
years ago, my recollection is that you have to define folder pairings
(i.e., what you wanted to synchronize). It is those names for those
pairings that you probably need to specify for the -R parameter.

From http://www.itechtalk.com/member687-albums555-5671.png, it looks
like you have to use the History tab (when looking at the properties of
an event) and then review Details tab to find out what happened.

> 4) After defining the event for when it generates the failure code,
> what happens if you copy the *entire* command line for the event and
> run it in a command prompt? If the program's executable isn't
> available via the currently defined PATH environment variable, you
> will need to 'cd' to the directory where the executable is located.
> Answer: I attempted to run the line in CMD as shown above in answer 2)
> and it did not execute'


If the command fails at a command prompt then it will also fail when ran
by a scheduled event. The command must first work when executed by
itself for it to also work as a scheduled event.

> 5) you will need to 'cd'
> DO NOT UNDERSTAND WHAT YOU MEAN BY 'CD'


'cd' is the change directory command at a DOS prompt (i.e., when you are
at a command prompt). If the path to an executable isn't found by using
the PATH environment variable (or through a registry value) then you
will get an error of "not found" or "not defined" when you try to
execute the unknown program. If not in the PATH (or registry), you need
to 'cd' to the directory where the executable file resides and then
enter your command. However, as you pointed out above, you do know the
full path to the executable file.

> 6) Did you look at Task Scheduler's log (advanced menu)?
> Answer I could not locate the Task Scheduler's Log (advanced menu)


I'm still using Windows XP but assumed that Task Scheduler in Windows
Vista still lets users see its logfile. There is no Advanced menu?
From the images for the link above, yep, Microsoft altered the UI for
Task Scheduler but the log (history) is still available.

That image was taken from the following online help guide and which
addresses how to use Task Scheduler under Windows Vista:

http://www.windowsvistauserguide.com/task_scheduler.htm

> Two are working and 14 or not.Yet
> I feel I used the same actions in all but only changed the
> 'Arguments' as it related to each schedule task.


To reiterate, the command must first work at a command prompt before you
can specify it in a scheduled event. From the above comments, the
program failed when you ran it from the command line, so it also fail
when loaded by a scheduled event.
 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
RE: How to allow non-admin to run scheduled tasks remotely? Jason Windows Server 1 11-05-2010 06:59 PM
Scheduled Tasks - delete by executed task Tom_Slycke Windows Server 1 07-15-2009 04:38 PM
Re: Can't interact with Scheduled Task Pegasus \(MVP\) Windows Server 0 09-20-2007 01:59 PM
VBS Script doesn't run as a scheduled task Amanda George Windows Server 17 01-26-2005 07:41 PM
Re: AT command Windows Server 1 06-03-2004 11:29 AM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59