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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

issue with scheduling a job

Status
Not open for further replies.

SqlHunter

Programmer
Jun 3, 2004
166
US
My task is to check a directory where a lot of files of different format will be saved .it could be pdf,word,excel..etc.The naming would be emp_id+_+abbreviation.ext.eg would be 52729_APS.pdf and I have to save the emp_id,abbrivation,path and extension in emp_details table for uploading at later stage.I had a vb program which would check and save it to the table.

Now the I have to schedule a program which would check every 5 minutes in the directory to see whether any new documents are there and if present then I will have to save the details to the emp_details table

Is there any way we can do this with DTS Or is there any way I can schedule that VB project to
check every 5 minutes
 
Use task scheduler to run the VB program every 5 minutes. Or if you want to control is from SQL Server schedule a job that runs the VB program that runs every 5 minutes.

Denny

--Anything is possible. All it takes is a little research. (Me)

[noevil]
 
I haven't used both..how can I use the task sheduler to do this.
Again the application I have a vb.exe application so how can i use it with the SQl server schedule
 
Task Scheduler (actually called Scheduled Tasks) is in the control pannel. Open the icon, and drag the EXE into the folder. Then right click on the icon and click properties, then change the schedule and set the account that will run the app.

Job schedule a job, open EM, then open the server, then SQL Server Agent, then Jobs. Right click and select new job. Name the job, and add a job step. Change the type to Operating System Command CMDEXE and put the path in the big box. Click ok, and schedule the job on the next tab.

Denny

--Anything is possible. All it takes is a little research. (Me)

[noevil]
 
But right now the vb.exe is in my local drive and its SWE.exe and I tried giving the path but still wasn't working
 
You'll need to copy the exe to the server's drive, and install any needed dll files. I would recommend having VB create an installer for the program and using that installer to put the exe on the server so that all the needed DLLs are put on the server and registered properly.

Denny

--Anything is possible. All it takes is a little research. (Me)

[noevil]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top