Peter,
Hi. We use the NT scheduler very extensively here. Here are some pointers:
1. Check your permissions. Check your permissions. Check your
permissions. You will need to setup the scheduler service with the correct
user & permissions. Otherwise things will not run.
2. The scheduler runs with system32 as the default directory - I suggest
you use explicit paths in your EXEs, batch files, etc.
3. User environment variables are not passed to services - set them up as
system variables.
4. A batch file works 100% of the time - so use a batch file, even if it is
just to run a small executable.
Example of batch file:
dir c:\winnt > c:\test
AT command line:
AT 13:00 "c:\test.bat"
5. Don't run services interactively as that will have to use the System
user. This user is "under-privileged".
6. You can also write a small launcher EXE to launch other processes with
another user's privileges. The Win32 API contains functions to do this.
Lookup the variants of CreateProcess.
7. Scheduled processes normally do not have user interfaces and will stop
running if a modal window expecting user input is created. This includes
all exception messages. (Trap Application.OnException).
8. Paradox pains: The NET dir setup can get very complicated when things
are scheduled. Make sure you use UNCs to specify the NET dir, and the user
has access to the UNC resource.
HTH
-----------------------------------------------------
Dennis Chuah, BE (Hons) [mailto:[EMAIL PROTECTED]]
Manager, Product Development
Contec Data Systems Ltd. [http://www.contecds.com]
tel: +64-3-3580060 ext-775 fax: +64-3-3588045
begin 666 Dennis Chuah.vcf
M0D5'24XZ5D-!4D0-"E9%4E-)3TXZ,BXQ#0I..D-H=6%H.T1E;FYI<SM#4PT*
M1DXZ1&5N;FES($-H=6%H#0I/4D<Z0V]N=&5C($=R;W5P($EN=&5R;F%T:6]N
M86P[0S(@1&5V96QO<&UE;G0-"E1)5$Q%.DUA;F%G97(L(%!R;V1U8W0@1&5V
M96QO<&UE;G0-"E1%3#M73U)+.U9/24-%.BLV-"TS+3,U.# P-C @97AT(#<W
M-0T*5$5,.U=/4DL[1D%8.BLV-"TS+3,U.#@P-#4-"D%$4CM73U)+.CL[4$\@
M0F]X(#@P,S4[0VAR:7-T8VAU<F-H.SL[3F5W(%IE86QA;F0-"DQ!0D5,.U=/
M4DL[14Y#3T1)3D<]455/5$5$+5!224Y404),13I03R!";W@@.# S-3TP1#TP
M04-H<FES=&-H=7)C:#TP1#TP04YE=R!:96%L86YD#0I54DPZ#0I54DPZ:'1T
M<#HO+W=W=RYC;VYT96-D<RYC;VT-"D5-04E,.U!2148[24Y415).150Z9&5N
M;FES8T!C;VYT96-D<RYC;VT-"E)%5CHQ.3DY,#,P,50P-#$P,CE:#0I%3D0Z
'5D-!4D0-"@``
`
end
---------------------------------------------------------------------------
New Zealand Delphi Users group - Offtopic List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz