Discussion Locked

SQL 2000 Job Scheduling

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I wrote a VB6 executable to run at night to handle Data Imports into SQL 2000. I scheduled this in SQL 2000 to run as a Job. It keeps on Failing. I Tell the Scheduler it is a CMDEXEC (Operating System Command) and I place the full path in the Command Textbox. When it is suppose to start running it shows the process started in the Task Manager, but the form I designed does not show, and the process hangs. Does the Scheduler not handle executables too well?

I can't find any guidance or sample code for this anywhere. Al samples simple schedule Stored Procs to run.

Any help will be appreciated

Regds
Len

5 replies

by medievaldude

I only setup stored procedures for jobs, but it should be able to handle a simple operation by itself. Here's how I run executables through SQL:

EXEC master..xp_cmdshell 'C:\mydirectory\myexe.exe'

Also, are you able to run it from query analyzer? If you can't, the job probably won't run right either.

Let me know if you have further questions.

by glen_mcleod

First of all, why do you need a form? Anything that you're scheduling shouldn't have a visible interface because no-one is going to see it.

Which brings me to my second point, you need to eliminate all UI elements and set the "Unatended execution" property for your app.

What you want is an executable (or .dll, which would have been my choice) that can be run by the system with no-one logged on. UI elements break that.

Glen

by len_v

Thanks Glen - I got rid of the GIU elements but in the end the Windows Scheduler worked better than the SQL 2K scheduler.

Thanks for your help
Len

This discussion is closed to new replies.