[AccessD] Scheduling an mdb to run using AT

Stuart McLachlan stuart at lexacorp.com.pg
Thu May 8 23:24:05 CDT 2003


On 9 May 2003 at 13:08, Software Design & Solutions P wrote:

> Have any of you had much experience with scheduling applications to run (ie. mdb files) using the AT command?
> 
> I am trying to get a job to run overnight for a client using the following syntax:
> 
> at 14:26 /interactive /Every:M,T,W,Th,F cmd /c D:\Prices\Priceload.bat
> 
> where the files Priceload.bat contains the following:
> 
> --------------------------------------------------------------------------------
> 
> @ECHO OFF
> REM Daily Price File Load
> TITLE GBST PRICE LOAD
> 
> M:
> cd \Price
> echo ENTER PRICE FOLDER
> ntsleep 2 > nul

What OS? (I don't recognise NTSLEEP - what is it doing)

> 
> Call Price.mdb
> 
> --------------------------------------------------------------------------------
> 
> 
> I then get the message 'M:\Price\Price.mdb file not found'.
> 

It is actually looking for a file called M:\Price\Price.mdb.bat :-(
CALL  will only run another batch file.

To open the MDB , you need to actually run Access and give the MDB name as a parameter

Replace the line - Call Price.mdb
 with -
"c:\program files\microsoft office\office\msaccess.exe"  Price.mdb

or whatever the path is to the access application

> 
> So my question for anyone using AT is: do you have any tips to share? What is the most reliable way you have found to schedule an mdb to run?
> 

I generally just do a

AT 05:00 /Every:Mo,Tu,We,Th,Fr  GetPrice

Then I create a batchfile (GetPrice.cmd) which just contains one line:

"c:\program files\microsoft office\office\msaccess.exe"  C:\Apps\GetPrice.mdb




-- 
Stuart McLachlan
Lexacorp Ltd
Application Development,  IT Consultancy
http://www.lexacorp.com.pg



More information about the AccessD mailing list