Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Task Scheduler Question

Status
Not open for further replies.

specious

MIS
Jul 23, 2001
14
US
Anyone have any idea how to use Task Scheduler to run a Batch file. I am trying to automate a batch file that downloads Oracle queries and uploads it to an Access db. Thanks in advance.
 
I'm only can give you a partial answer to this question. I'm missing a key part to the answer but I know that they do this sort of thing at our work.

First we create a batch process. It could be as simple as some update queries, or a more complex routine.

Next create a macro and inside the macro include the your update procedure. It could be just the update query or it might be something like RunCode and then the procedure you wrote.

Now this part I'm unsure of. You can use the scheduler to run the macro. I don't know how you get the task scheduler to run just the macro and not Access but somehow the IS (Information Systems) guys do this for me.

I hope this helps,
Rewdee
 
Thanks Rewdee. I got everything working properly, except for the task scheduler part. Task Scheduler wizard in for NT asks for a program to start at the given scheduled time. The problem that I am facing is that I can select the .bat file to start, but it needs Cmd.exe to start first. Anyone have any leads on this one. I have also tried the AT command and I can not get it to do what I need it to also. Thanks.
 
What happened wrong when you used the AT command? I would create a blank MDB, link the necessary tables to it so that the data can be uploaded and have an autoexec macro that loads the data. I would then write the batch that runs the SQL queries from Oracle and then opens this new MDB so that it auto loads the data. After that, set up AT to run the batch:

AT \\ServerName 0100a /every: m,t,w,th,f,s,su "C:\MyPath\MyBatchFile.bat"

I have several batches that kick off run through AT. Terry M. Hoey
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top