\
Tips and Tricks
Tools
JT.EXE
This is a free tool from Microsoft which is believe available
in both NT and WIN2000 resource kits.
Windows XP has yet another tool which comes with the operating system called
"SCHTASKS.EXE"
(Microsoft never seem to get anything right...)!
This tool is used to set up job/task schedules in the
Windows NT, 2000 and XP scheduling GUI (from the command line).
WinNT seems to generate weird "permission denied" errors on longer
command lines (about 500 chars?) so it is advisable to use the "@ file"
mechanism to shorten it.
The "Schedule" command requires this tool
(or "SCHTASKS.EXE") to be available at install
time (you can install it along with your package if required).
You can download it from microsoft's site
(ftp://ftp.microsoft.com/reskit/win2000/jt.zip
).
There is no documentation so you may wish to see the macro sample,
also note that you can get help by typing
"JT.EXE /?" or "JT.EXE /? LJ" etc.
An easy way to get a list of task attributes is
"JT.EXE /pj" (some of these don't work - probably JT.EXE bug).
The following is an example of the command I used when trying
to work out the required syntax to set a trigger up the way I
wanted it:
ms_jt /CTJ Type = WEEKLY TypeArguments=1,.M.W.F. /ptj
Note that in a lot of ways this tool is "brain dead"
so you will have trouble at times getting it to work (for
example I have not figured out how a double quoted parameter
can contain double quotes, I suspect it can't).
It would be too useful if it could dump a schedule in the
same format it takes it which is why Microsoft decided not to
include the feature...
| Debugging Creation Problems |
Check the NAKEMSI (or Windows Installer) log for the full "JT.EXE"
command, you should be able to run this command if you have left
the install error message displayed (haven't rolled back yet).
The log or the commands console output will display some possibly
useful but generally cryptic information (the "JT.EXE" output).
You always seem to get a message
"[ERROR] Expected job property name but found token 'Interactive'",
it does appear to work though...
It will say "Created trigger x" before it has done so
(that is it should be "creating trigger").
It probably failed because of inconsistent values in the trigger.
Try creating a very simple trigger following the failing one to be sure.
My "favourite" way of stuffing things up is to supply a smaller value for
"MinutesDuration" than I supply for "MinutesInterval"...
The "/SJ" switch seems to fail (or at least it says so and returns a non-zero return code)
if the job already exists, I always delete any existing job first.
Using appropriate command line options you can load and existing job and
display its values.
This is a good way of working out what some of the values will be however,
from memory it is not always correct (different keywords!).
'JT.EXE' is not recognized as an internal or external command,
operable program or batch file.
'JT.EXE' is not recognized as an internal or external command,
operable program or batch file.
'JT.EXE' is not recognized as an internal or external command,
operable program or batch file.
'JT.EXE' is not recognized as an internal or external command,
operable program or batch file.
'JT.EXE' is not recognized as an internal or external command,
operable program or batch file.
'JT.EXE' is not recognized as an internal or external command,
operable program or batch file.
'JT.EXE' is not recognized as an internal or external command,
operable program or batch file.
'JT.EXE' is not recognized as an internal or external command,
operable program or batch file.
'JT.EXE' is not recognized as an internal or external command,
operable program or batch file.
'JT.EXE' is not recognized as an internal or external command,
operable program or batch file.
'JT.EXE' is not recognized as an internal or external command,
operable program or batch file.
'JT.EXE' is not recognized as an internal or external command,
operable program or batch file.
'JT.EXE' is not recognized as an internal or external command,
operable program or batch file.
'JT.EXE' is not recognized as an internal or external command,
operable program or batch file.
'JT.EXE' is not recognized as an internal or external command,
operable program or batch file.
'JT.EXE' is not recognized as an internal or external command,
operable program or batch file.
'JT.EXE' is not recognized as an internal or external command,
operable program or batch file.
'JT.EXE' is not recognized as an internal or external command,
operable program or batch file.
'JT.EXE' is not recognized as an internal or external command,
operable program or batch file.
'JT.EXE' is not recognized as an internal or external command,
operable program or batch file.
'JT.EXE' is not recognized as an internal or external command,
operable program or batch file.